Displaying plan files on Netezza V7.0

Netezza used to store query execution plans as ascii files in the /nz file system.  Active plans would be kept in /nz/data/plans and completed plans kept in /nz/kit/log/planshist/current/.  The problem with this was that anytime you wanted a plan file you would have to log onto the system to collect it.


Now, there is a SQL interface to capture the actual execution plan.  Beginning v7.0, you can type following from your SQL client (where 78752 is the plan #):


show planfiles 78752;


This will dump the plan file to your screen.  If using nzsql, prefix this with:


\o /tmp/78752.pln


Or re-direct it to a file.  If using Aginity or another ODBC/JDBC/OLEDB SQL client, copy and paste the output to a file for further analysis.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s