Taking more time when a query is executed in memory, than it is not not executed in memory

40 views
Skip to first unread message

Vinod

unread,
Jun 18, 2012, 10:33:29 AM6/18/12
to h2-da...@googlegroups.com
Hi,

I would appreciate any help on the issue that I am facing where a query is taking more time when executed in memory.

Attached is the sample program.
The details are:
Created a table
Created a few extra columns to achieve functional indexes.
Created indexes on these extra columns
Populated data
Executed test query.

Following are the execution results:
Using the java program, when the query is executed in memory - it takes 1500ms
Using the java program, when the query is executed not in memory - it takes 400ms
When using the H2 console in browser(started from java program using Server.main(null);), the query takes 160ms

Thanks,
Vinod
ImdbInMemoryPerfVsNonInMemoryPerf.java

Thomas Mueller

unread,
Jun 22, 2012, 9:09:36 AM6/22/12
to h2-da...@googlegroups.com
Hi,

Thanks! The query is really complicated. Could you try to simplify the
test case to the bare minimum?

Regards,
Thomas
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/K37pjwTydu4J.
> To post to this group, send email to h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to
> h2-database...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
Reply all
Reply to author
Forward
0 new messages