Hi Dan, The best place for performance tuning information is the documentation. There are several sections that can help with performance problems -- see below.
Solving a slow query/operation: http://www.h2database.com/html/faq.html#query_slow EXPLAIN and showing the query plan: http://www.h2database.com/html/grammar.html#explain Using the trace file & ConvertTraceFile to profile the DB & locate performance problems: http://www.h2database.com/html/performance.html#database_profiling Setting trace options: http://www.h2database.com/html/features.html#trace_options General performance tuning/optimization: http://www.h2database.com/html/performance.html#database_performance_tuning Answers to specific questions below. On Jul 24, 5:26 pm, Dan Armbrust <[email protected]> wrote: > jdbc:h2:file:/work/h2/test;CACHE_SIZE=131072; [snip] > you don't specify the units for the number that is to be > passed in. I'm assuming that it treats the number as MB? But I'm > just guessing.... As documented in the grammar, units are KiB, so this is ~131 MB. Plenty of cache, probably. > [excess table scans] Possible -- check the links above, and use EXPLAIN to check this. It can happen if ANALYZE hasn't been run recently or the indexes aren't usable for your query. > Any suggestions of other things to try to speed it up? Look for what the cause of the problem is using the tools above. If you find something, post it here with pertinent info about your DB structure (tables, indexes, data types & sizes). People are happy to work with you to help improve performance. In one case, we were able to more than double insert performance & increase query performance by an order of magnitude. See example (still ongoing): http://groups.google.com/group/h2-database/browse_frm/thread/1ebee8794e1720c7?hl=en > Is there anyway to have H2 give me something similar to the "Explain" H2 provides EXPLAIN -- see link above. > Or even better yet, an option to log "slow" queries > (where slow is a user defined variable)? Yes, via the trace file. See links above. ABOUT PERFORMANCE IN GENERAL: H2 is a relatively young DBMS, and quite precocious for its age. It still has some less polished areas due to its youth, but if you can help pinpoint specific problems, they will probably be fixed soon. Thomas Mueller has been regularly pumping out multiple daily commits and weekly releases. The new page store which was recently introduced should address overall performance problems. It's a major change, so it may be a bit before it has been fully debugged and optimized though. Cheers, Bob McGee --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
