The _Sql_Qplan virtual system table

The virtual system table (VST) called _Sql_Qplan contains query plans for the last 10 queries that were executed. The CREATE TABLE statement shows you its definition in the following example.

CREATE TABLE "_Sql_Qplan" ( 
"_Pnumber" INTEGER NOT NULL, 
"_Ptype" INTEGER NOT NULL, 
"_Dtype" INTEGER NOT NULL, 
"_Description" VARCHAR (255) NOT NULL, 
"_Dseq" INTEGER NOT NULL
); 

The following table offers a description for the columns in the _SQL_Qplan Virtual System Table.

Table 1. _SQL_Qplan Virtual System Table
Name Description
_Pnumber Query plan number, in descending order. Has no inherent significance. It merely groups together all the rows for a query plan.
_Ptype Query plan type. Is > 0 for an application query and < 0 for an internally generated query.
_DType Not used. In the future, this column will provide descriptive information about the plan.
_Description Contains a description of part of the query plan.
_Dseq Query plan row number, ordering the rows describing the plan for a particular table.