Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISQL plan output is unexpectedly truncated after a query is simplified to become shorter [CORE5061] #5348

Closed
firebird-automations opened this issue Dec 31, 2015 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

firebird-automations commented Dec 31, 2015

Submitted by: @pavel-zotov

Attachments:
isql-explained-plan-cut-off-when-query-is-simlified.zip

Consider two queries from attached zip. The only difference between them is:

Q1:

    select 
        char_length(mon$explained_plan)
       ,(select count(*) from r4)
       ,(select count(*) from rn)
       ,(select count(*) from rn)
    from mon$statements

Q2:

    select 
        char_length(mon$explained_plan)
       ,(select count(*) from r4)
       ,(select count(*) from rn)
       --,(select count(*) from rn)
    from mon$statements

(i.e. Q2 is simplified: one of columns is excluded from selection).

Q1 has length of mon$explained plan = 64436 and length of output in ISQL when "set explain on" = 64944 (difference ~500 can be explained by number of occurences ascii_char(13) in output of 'set explain on').

Q2 (which is simplified case of Q1) has length of mon$explained plan = 63237 but length of ouput in ISQL when "set explain on" = 33024. Plan in ISQL looks as:

===
                                            ->  Nested Loop Join (anti)
                                                -> Recursion
                                                    -> First N Records
                                                        -> Window
                                                            -> Record Buffer (record length: ...
===

Checked on WI-V3.0.0.32256.

Commits: 24b7a79 FirebirdSQL/fbt-repository@f60a6b7

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

Attachment: isql-explained-plan-cut-off-when-query-is-simlified.zip [ 12864 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

summary: ISQL output of explained plan is shorter by ~ 2 times when query is simplified by removing one of selected columns from it => ISQL plan output is unexpectedly truncated after a query is simplified to become shorter

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 RC2 [ 10048 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants