Hi,
The answer can vary a lot. Also, the relevant cache requirement should be -- its not the same query, but the result set that the query is going to return remain same/similar or not. 1. As you are running in embedded mode, first Q I ask is what kind of disk are you writing to. If you are writing to RAM disk, then it's already in memory for you. If not, then can you think of it as one option. 2. If the above is not an option, next option could be setup CACHE_SIZE. This should depend upon the size of data that your query needs to churn through to produce your result set. This can eat up your heap but if you have enough memory, this might be an option. 3. If you know the result set is going to be same for some time then you can setup read-thru cache yourself in simple map based cache with TTL set to expire as per you app requirement. Or use any caching framework. There are so many. HTH Navjot Singh From: [email protected] [mailto:[email protected]] On Behalf Of Mike Funaro Sent: 26 March 2013 19:45 To: [email protected] Subject: Cache query results? HI Everyone, I started using H2 as an alternative to Derby because of the tremendous speeds. I am using it in embedded mode. For my application, there is a possibility of having the same SELECT query run time after time, is there any kind of mechanism to cache those query results so that another SELECT query would not have to be run? If you need more details about how my application operates I would be happy to elaborate. Thanks, Mike -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
