From: lenygold via DBMonster.com on 1 Oct 2008 17:28 I run this 2 queries on my Home PC - DB2 9.5C EXPLAIN PLAN SET QUERYNO = 1 FOR SELECT * FROM STAFF WHERE ID > ?; DB20000I The SQL command completed successfully. and then this one: SELECT * FROM PLAN_TABLE WHERE QUERYNO = 1 ORDER BY TIMESTAMP, QUERYNO, QBLOCKNO, PLANNO, MIXOPSEQ WITH UR; sqlcode: -0204 PLAN_TABLE " is an undefined name. Shoul i create it? Thank's in advance -- Message posted via DBMonster.com http://www.dbmonster.com/Uwe/Forums.aspx/ibm-db2/200810/1
From: Ian on 1 Oct 2008 18:28 lenygold via DBMonster.com wrote: > I run this 2 queries on my Home PC - DB2 9.5C > > EXPLAIN PLAN SET QUERYNO = 1 FOR > SELECT * FROM STAFF > WHERE ID > ?; > DB20000I The SQL command completed successfully. > and then this one: > > SELECT * > FROM PLAN_TABLE > WHERE > QUERYNO = 1 > ORDER BY TIMESTAMP, QUERYNO, QBLOCKNO, PLANNO, MIXOPSEQ > WITH UR; > sqlcode: -0204 > > PLAN_TABLE " is an undefined name. DB2 on LUW uses tables named EXPLAIN_% You probably want to look at the db2exfmt utility to pull data out of the explain tables. Or, you can use the visual explain functionality built in to control center.
From: lenygold via DBMonster.com on 1 Oct 2008 18:29 I also tried CREATE TABLE "LENY GOLD".PLAN_TABLE LIKE DEFAULT.PLAN_TABLE; same error: sqlcode -204 lenygold wrote: >I run this 2 queries on my Home PC - DB2 9.5C > >EXPLAIN PLAN SET QUERYNO = 1 FOR >SELECT * FROM STAFF > WHERE ID > ?; >DB20000I The SQL command completed successfully. >and then this one: > >SELECT * >FROM PLAN_TABLE >WHERE >QUERYNO = 1 >ORDER BY TIMESTAMP, QUERYNO, QBLOCKNO, PLANNO, MIXOPSEQ >WITH UR; >sqlcode: -0204 > >PLAN_TABLE " is an undefined name. > >Shoul i create it? >Thank's in advance -- Message posted via DBMonster.com http://www.dbmonster.com/Uwe/Forums.aspx/ibm-db2/200810/1
From: Mark A on 1 Oct 2008 22:04 "lenygold via DBMonster.com" <u41482(a)uwe> wrote in message news:8b086d4ec1d97(a)uwe... >I run this 2 queries on my Home PC - DB2 9.5C > > EXPLAIN PLAN SET QUERYNO = 1 FOR > SELECT * FROM STAFF > WHERE ID > ?; > DB20000I The SQL command completed successfully. > and then this one: > > SELECT * > FROM PLAN_TABLE > WHERE > QUERYNO = 1 > ORDER BY TIMESTAMP, QUERYNO, QBLOCKNO, PLANNO, MIXOPSEQ > WITH UR; > sqlcode: -0204 > > PLAN_TABLE " is an undefined > name. > > Shoul i create it? > Thanks in advance The PLAN_TABLE is for DB2 for z/OS. DB2 for LUW uses several different catalog tables to store the relevant explain information, as noted by Ian. For many years on DB2 for z/OS the PLAN_TABLE was the only table that had explain information, but they now have other tables also that can be queried.
|
Pages: 1 Prev: SqlException Unsupported ccsid, encoding, or locale: "Cp037" Next: DSNL013I & DDF, DB2 9.1 |