I have table with a lot of rows (> 150 000). I need select by condition only from n first rows (for, example first 10000) What is the most robust solution for this.
Is it possible whithout secondary select query, like this
select * from (select * from table1 limit 10000 order by id) where condition;
Or is it ok to do it like this?