Hi all, I was doing some application profiling today. I found that in our real-world scenario of loading a database using many different very long SQL statements, a significant amount of H2's CPU time was being spent in org.h2.command.Parser.initialise().
Further investigation revealed that by default, H2 caches only 8 prepared statements in a least recently used cache. Use 9 or more prepared statements repeatedly - as our application does - and you lose all benefit of the prepared statement cache. The effect is the same as if the query cache was set to 0, except for the continual overhead of cache churn. I performed my profiling again, this time with QUERY_CACHE_SIZE set to 100. This time I managed to run 40% more queries in the same timeframe, measured over several minutes of sustained inserts, updates, selects, and merges. I proposed that the value for QUERY_CACHE_SIZE should by default be significantly higher. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
