db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Beyer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2487) Enhance Derby with EXPLAIN Functionality
Date Wed, 28 Mar 2007 08:46:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484764

Felix Beyer commented on DERBY-2487:

>Why did you choose to spell "explain" without the "e" in the code?
There`s no special reason for this. Maybe to distinguish the special Derby explain behaviour
from expectations coming from users , who are familiar with the explain functions of commercial

The current explain implementation is optimized for ad-hoc queries and tool support Furthermore
the explain data is quite extensive to analyze. I wanted to make a compromise between detailed
explain information which is almost unreadable by human users and which has to be evaluated
with the help of a tool and a compact version of explain data which is only applicable for
rough investigations but is still browseable by human users.

>1) If multiple people are simultaneously using explain mode to store query plans into
>the system catalogs, how do they distinguish their explain data from each other?
The XPLAINStatements catalog does not have a user attribute to distinguish the explain data
by users. By now the only way to distinguish explain data is via their UUID and the session
id attribute. (see physical schema) In Net environments the drda id is additionally available
to clearify the net connection and thus the user.

>2) If I use explain mode for multiple SQL statements, how do I go back in after the
>fact and find the particular explain data for the particular SQL statement that I'm interested
The easiest way to do this is to filter out the wanted explain data by the stmt text attribute.
If there are more statements which have the same stmt text then go for the explain timestamp
and pick the one which is right.
select stmt_text, stmt_id, xplain_time from sys.sysxplain_statements order by stmt_text, xplain_time;
With the wanted stmt_id step into the other catalogs to query more data.

> Enhance Derby with EXPLAIN Functionality
> ----------------------------------------
>                 Key: DERBY-2487
>                 URL: https://issues.apache.org/jira/browse/DERBY-2487
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions:
>            Reporter: Felix Beyer
>            Priority: Minor
>         Attachments: Derby physical XPLAIN schema.png, RSProtocolNew.pdf, rts.xls, small
logical xplain schema.pdf, usage.txt, xplain_patch_v1.txt, xplainClasses.pdf
> This enhancement extends Derby with EXPLAIN functions. Users want to have more feedback
than they`re getting with the current RuntimeStatistics facility. This extension is based
on the RuntimeStatistics/ResultSetStatistics functions / classes. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message