Skip to Content

One of the new features in ASE 15.7 SP100 is the ability to generate

query plans in graphical format – in HTML format, to be precise.

Both in terms of their appearance and the commands to enable them, ASE’s

HTML query plans have clearly borrowed some ideas from Sybase IQ.

Indeed, ASE users who also worked with IQ have often voiced a desire for

graphical, IQ-like query plans in ASE as well. Those wishes have now

been granted.

Generating HTML query plans is simple. First, you must be running ASE 15.7 SP100 or later.

Next, you need to enable HTML plans the following commands (there are

additional ‘set statistics’ commands for controlling the HTML plans, but

please see the documentation for that; I’ll restrict myself to the main

commands here):

set statistics plan_html on

go

set statistics timing_html on

go

set statistics plan_detail_html on

go

set statistics plan_directory_html ‘/opt/my_html_plans’

go

When you then execute a query, the plan ends up in an HTML file in the

specified directory. When you open the file in a browser, it looks something colorful like this (click to enlarge):

(NB: only some parts are displayed here since the total HTML plan is too large to include here completely — the full HTML file can be downloaded from the link below this blog post).

At the top you’ll see the query plan in a graphical tree-like format. When clicking on a node, you jump to a box as shown below, which has more details about that particular query plan operator.

One thing you will notice quickly is that the ASE HTML plans have

details about execution time in various places. This is clearly inspired by

Sybase IQ where timing is the primary quantitative angle when looking at

query plans.

In ASE, we have always looked at I/Os to understand and compare

efficiency aspects of query plans, and there is no reason to stop doing that.

However, these execution timing details were never there available

in ASE in this way before so it’s a new piece of information we are

getting here (we need to figure out how to best use this information in

practice).

More details about HTML query plans are here available in the documentation for ASE 15.7 SP100 at this link.

The full HTML file for the plan above can be downloaded from the link directly below this blog post.

HTML plans are yet another reason to check out ASE 15.7 SP100. Enjoy!

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Vincent Rives

    Very interesting feature!

    Does this feature work with the compatibility mode?

    I suspect it won’t work similarly to XML query plans which don’t work in compatibility mode?

    Thank you Rob!

    (0) 
  2. Jason Froebe

    Make sure the directory that you’re putting the html query plans has plenty of space.  You don’t want to fill up the file system that ASE is residing on else ASE can magically hang or go down. 

    (0) 

Leave a Reply