On May 7, 2009, at 14:23 , Brish wrote: > On May 7, 5:14 am, beaTunes Support <[email protected]> wrote: >> On May 6, 2009, at 23:35 , Brish wrote: >> Yes, Brish, for moving back and forth that would be good. >> But unfortunately the initial query still takes a very long time with >> h2. > > Most databases can iterate over results so they can return the first > few results immediately regardless of the result set size if the > result set isn't ordered or if the order can be resolved by an index.
Actually, if I don't order the resultset the speed is great. It's only the ordered queries that are slow. Anyhow - what I am doing at the moment, is query for id ordered by the field I would like to have it ordered by and then load individial pages by id, which is fast enough. Just the original ordered query is the problem. In this case, H2 does not use the index for ordering. So as a consequence, it has to order the whole resultset, before it can return anything, i.e. the initial query will always be slow. The only think I can think of that might speed up the thing is tweaking some memory settings to make sure everything is ordered in memory. So, for resultsets up to 200.000, but usually between 10.000 and 50.000, is there a recommended setting to speed up ordering in memory? Thanks, -hendrik --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
