Issue Details (XML | Word | Printable)

Key: CORE-2303
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Douglas Tosi
Votes: 5
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Include PLAN in mon$statements

Created: 02/Feb/09 06:55 PM   Updated: 28/Sep/15 01:37 PM
Component/s: Engine
Affects Version/s: 2.1.1
Fix Version/s: 3.0 Beta 1

Environment: Every Firebird Version
Issue Links:
Relate
 

QA Status: Done successfully


 Description  « Hide
Currently, if the user wants to know the plan used for a certain statement, [s]he has to prepare the statement on a different attachment.
Depending on the number of statements, this may be an unacceptable overhead.
Plus, there is a change that some index changed after the original statement. The plan could then be different and the analysis compromised.

Please include the statement's PLAN in the monitoring tables. The most straight forward way I can think of is to include a mon$plan field in mon$statements.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 11/Sep/12 06:35 PM
In Firebird 3, there are two kind of reported plans: legacy one and new detailed one. Honestly, I'd hate to have them both available in MON$STATEMENTS. Do you think it could be a problem if only the new plan will be reported?

Karol Bieniaszewski added a comment - 25/Mar/15 09:12 AM
Dimitry,
for big queries legacy plan is truncated - and there is no way to get full text of it
Then MON$STATEMENTS will be only place where we can got full text of them.
Why it is important?
As you remember legacy plan can be included in sql itself but explained plan not.
Because of that will be good to have it both

Dmitry Yemanov added a comment - 25/Mar/15 09:20 AM
Truncated detailed plans will be fixed (after Beta 2). Not every legacy plan can be specified in the SQL text, so it's pretty much useless for any complex query. So I'm still not sure we need to report legacy plans in MON$STATEMENTS.

Karol Bieniaszewski added a comment - 25/Mar/15 02:14 PM
>>Truncated detailed plans will be fixed (after Beta 2).

Thank you :)

>>Not every legacy plan can be specified in the SQL text, so it's pretty much useless for any complex query. So I'm still not sure we need to report legacy plans in MON$STATEMENTS.

Ok - but you can adapt it and then use it
but if you do not see it at all (because truncation) you start from zero point