I've now created a patch for this (see attachment). Feel free to use it under whatever license suits you.
When running then benchmark the difference was negligible. However, after reading the benchmark code I couldn't find any part of that actually would benefit from this patch (since all read are by column-index not by name). Perhaps that it something that could be added (e.g. by making queryReadResult read by column-name)? My guess would be that getting by column-name would be more common so that could potentially make the tests more similar to a real-world scenario. Regards Carl From: [email protected] [mailto:[email protected]] On Behalf Of Carl Hasselskog Sent: den 26 april 2012 11:17 To: [email protected] Subject: RE: Potential performance improvement I've identified the problem. It was Window's indexing service that locked the files. Moving it to a non-indexed dir solved it. I'll run the benchmark now and then we can see if the caching improves anything. Regards Carl From: [email protected]<mailto:[email protected]> [mailto:[email protected]]<mailto:[mailto:[email protected]]> On Behalf Of Thomas Mueller Sent: den 26 april 2012 07:18 To: [email protected]<mailto:[email protected]> Subject: Re: Potential performance improvement Hi, But what about the field columnLabelMap? From what I can that is re-calcalculated in every new instance of JdbcResultSet. Can't that be cached as well? It could be cached in theory, but I don't think it would be worth the effort. If you care a lot about performance, I suggest to use column indexes. > The Swedish message in the IOException says that the file is locked. That could mean another build is currently running. Could you verify this using "jps -l"? > java.lang.NoClassDefFoundError: org/apache/lucene/search/Searcher That means Lucene is not available, or (more likely) a different, incompatible version is available on the classpath. Could you run built.bat clean and then built.bat before running the test? Or use Eclipse. Regards, Thomas -----Original Message----- From: [email protected]<mailto:[email protected]> [mailto:[email protected]]<mailto:[mailto:[email protected]]> On Behalf Of Noel Grandin Sent: den 23 april 2012 22:45 To: [email protected]<mailto:[email protected]> Subject: Re: Potential performance improvement Good idea. We already do that :-) On Mon, Apr 23, 2012 at 22:21, Carl Hasselskog <[email protected]<mailto:[email protected]>> wrote: > That's a cool idea! I also had another (which is not mutually exclusive to > yours). Perhaps one can cache the column-mapping in JdbcPreparedStatement and > re-use it for every execution of the same query. I don't know if there's any > corner case where JdbcPreparedStatement might have different column-mappings > in different executions but perhaps one can make it an optional feature? > -- 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]<mailto:[email protected]>. To unsubscribe from this group, send email to [email protected]<mailto:[email protected]>. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en. -- 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]<mailto:[email protected]>. To unsubscribe from this group, send email to [email protected]<mailto:[email protected]>. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en. -- 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]<mailto:[email protected]>. To unsubscribe from this group, send email to [email protected]<mailto:[email protected]>. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en. -- 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]<mailto:[email protected]>. To unsubscribe from this group, send email to [email protected]<mailto:[email protected]>. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en. -- 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.
cachedColumnMappingPatch.diff
Description: cachedColumnMappingPatch.diff
