Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB2 Explain in WebFOCUS 1

Status
Not open for further replies.

sonjas

MIS
Jul 9, 2003
3
DE
Hi,

if I use the WebFOCUS-Command
"SQL DB2 SET EXPLAIN ON"
the following by the TABLE-Command created SQL-Command is analyzed and the analyze-results are written into DB2-table "userid.PLAN_TABLE".

Well, I've two questions:
1. Is it possible to write to an arbitrary PLAN_TABLE, e.g.
"otherId.PLAN_TABLE"?
2. The TABLE-Command is executed although EXPLAIN is on.
I would expect only the analyzing not the real table-results. Before really executing I first want to know how "well-formed" the SQL-Select is. Does anybody know how to prevent WebFOCUS from really executing the TABLE-Command when EXPLAIN is on?

Thanks for any clue!
sonjas
 
Sonjas,

to prevent any data retrieval use

SET XRETRIEVAL = OFF

This will run the job as normal, creating all of the hold files and master files etc, but will not retrieve any data. It's an easy way to check syntax / sql etc.

When you need to turn retrieval back on, it's just

SET XRETRIEVAL = ON

As far as the plan table goes, it's a long time since I've used DB2, but there were always problems getting sufficient permissions from dba's to create tables! Hopefully someone else will be able to help you here.

regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top