Reading analyze explain execution plan

30 views
Skip to first unread message

BrianR

unread,
Sep 20, 2012, 4:03:17 PM9/20/12
to h2-da...@googlegroups.com
How do I know if  query A is faster than query B ? Here are the bottom summaries of two execution plans for two queries generating the same result. I believe B is better than A. 

Query A

/*
total: 1186
BAR.BAR_DATA read: 858 (72%)
BAR.BAR_PARENT read: 82 (6%)
DATA_FOO.DF_FK2_INDEX_E read: 26 (2%)
DATA_FOO.DATA_FOO_DATA read: 220 (18%)
*/

Query B

/*
total: 15
BAR.BAR_DATA read: 5 (33%)
DATA_FOO.DF_FK2_INDEX_E read: 1 (6%)
DATA_FOO.DATA_FOO_DATA read: 4 (26%)
DATA_FOO.DATA_FOO_UUID read: 5 (33%)
*/

What does the "total" number represent? Can I use the "total" as a reference point to the cost of the query? I know I can look at the scan counts and how indices are used in the rest of the plan to optimize. But, can I use the total as the overall cost?

Thomas Mueller

unread,
Sep 21, 2012, 11:08:13 AM9/21/12
to h2-da...@googlegroups.com
Hi,

This is the number of pages read from the file. Pages that are cached are not read from the file.

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/-/8XXO-u9KBS0J.
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