Qep

From PTAGISWiki

Jump to: navigation, search

To generate a Query Execution Plan for an SQL query in Ingres:

sql -uuser dbname
set optimizeonly
set qep
select * from table
\p\g
\q

The above commands run the Ingres SQL terminal monitor, set the query execution facility to only run the optimization step and not run the query, then it says to print the query execution plan, or qep. The backslash p and g commands print the contents of the sql terminal monitor and make the query go. Backslash q quits the terminal monitor.

The sql command accepts std-in writes to std-out.

How to read a QEP

Personal tools