[
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 DBMS.
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 in?
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: 10.2.2.0
> 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.