Hi Thomas, Thanks for the suggestion. Unfortunately, it takes a couple of seconds to do the index so, while that would help for if I sort again by the same column, it does not really help with the initial sort.
I guess one of my real questions and why I was hoping that their would be some parameter I can tune is that I see such a huge difference in performance between Mysql and H2 when I sort. Using the same machine, same data set, and a simple query like: select * from myTestTable order by column5 limit 100; where column5 happens to be a varchar(255) on a table with 50k rows, I am getting results of 0.13 seconds for Mysql and 1.879 seconds for H2. I bounced Mysql to make sure that the performance was not related to some caching magic and it is not that. However, the big difference is that Mysql has been tuned while my test against H2 has not. However, if there is no way to better tune for this case, maybe the one time hit for the index is acceptable. Thanks again for the suggestion. -- Mark On Jun 19, 8:26 am, Thomas Mueller <[email protected]> wrote: > Hi, > > One solution is to create an index on demand. Other than that, I don't > really see a way how to solve your problem. Without index, it will > have to read all data. > > Regards, > Thomas -- 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.
