Hi, I have a simple table which contains one million rows and when executing below query: select * from foo limit 50 offset 900000 it needs about 14-15 seconds, instead, if executing query: select * from foo limit 50 offset 100 it only costs about 20 milliseconds.
I test it with h2 1.3.150 and using embedded mode. The table foo is fairly simple: create table test ( ID LONG NOT NULL AUTO_INCREMENT PRIMARY KEY, FILEPATH VARCHAR, FILENAME VARCHAR, UPLOAD TIMESTAMP) By the way, whether I use order by ID or not, the result is same. Can some one tell me why and how to optimize this? Thanks in advance. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
