Sure you can run native queries in Jmix.
Use EntityManager or Spring’s JdbcTemplate, for example:
@Autowired
private DataSource dataSource;
public void executeSql() {
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
// ...
See also this hint for improving performance of data saving: DataManager save function's effeciency too low