Menu

#291 Query Plan For Sybase

open
Unknown (17)
5
2012-12-29
2008-07-12
JohnnyBoy
No

Currently if you do
set SHOWPLAN ON
before your query, the plan is displayed in the error box but it isn't formatted nicely
e.g.
########################################################
Warning:

SQLState: 01ZZZ
ErrorCode: 6248Warning: QUERY PLAN FOR STATEMENT 1 (at line 2).

SQLState: 01ZZZ
ErrorCode: 6289Warning:

SQLState: 01ZZZ
ErrorCode: 6248Warning:

SQLState: 01ZZZ
ErrorCode: 6248Warning: STEP 1

SQLState: 01ZZZ
ErrorCode: 6201Warning: The type of query is SELECT.

SQLState: 01ZZZ
ErrorCode: 10262Warning:

SQLState: 01ZZZ
ErrorCode: 6248Warning: 3 operator(s) under root

SQLState: 01ZZZ
ErrorCode: 6248Warning:

SQLState: 01ZZZ
ErrorCode: 6248Warning: |ROOT:EMIT Operator

SQLState: 01ZZZ
ErrorCode: 6248Warning: |

SQLState: 01ZZZ
ErrorCode: 6248Warning: | |NESTED LOOP JOIN Operator (Join Type: Inner Join)

SQLState: 01ZZZ
ErrorCode: 6248Warning: | |

SQLState: 01ZZZ
ErrorCode: 6248Warning: | | |SCAN Operator

SQLState: 01ZZZ
ErrorCode: 6248Warning: | | | FROM TABLE
########################################################

It would be better to show the plan in a separate window or tab.
You could have options when running a query:
1) Run (as it is now)
2) Run and show show plan

An example of what I am talking about is:
http://www.aquafold.com/screenshots/sybase-execplan-doc-large.jpg

There is some sample code here:
http://groups.google.com/group/sybase.public.jconnect50/browse_frm/thread/6e145e2bc1066d08/4dd20bde6d550146?lnk=st&q=sybase+show+plan+java&rnum=2&hl=en#4dd20bde6d550146

Discussion


Log in to post a comment.

MongoDB Logo MongoDB