473,395 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

TOADS Explain plan

19
Hi,

I want the explain plan. But when I clicked on the explain plan it says ORA-02404: specified plan table not found. I investigated on net and some books. I was asked to load the utlxplan.sql. I did that but of no use. I also changed the name of the plan table in TOAD, still no use. New thing I heard recently is to run TOADPREP.SQL. But this script is not available on our server($ORACLE_HOME/rdbms/admin). Can someone please suggest me what to do in order to get the explain plan.

Thanks,
Jun 12 '08 #1
3 18586
Dave44
153 100+
Can you query the plan table by itself? you should be able to run something like
select * from plan_table
and get no rows returned. if not you either havent created the table or dont have privileges to use it.

another thing to check is in the properties if toad has called the table TOAD_PLAN_TABLE rather than just plan_table.

the other thing you are calling (once you have explained a query) is this
select * from table(dbms_xplan.display);
Jun 20 '08 #2
QVeen72
1,445 Expert 1GB
Hi,

First Create a Plan_Table, use the above said utility or you can run this :

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE PLAN_TABLE (
  2.   STATEMENT_ID                    VARCHAR2(30),
  3.   TIMESTAMP                       DATE,
  4.   REMARKS                         VARCHAR2(80),
  5.   OPERATION                       VARCHAR2(30),
  6.   OPTIONS                         VARCHAR2(30),
  7.   OBJECT_NODE                     VARCHAR2(128),
  8.   OBJECT_OWNER                    VARCHAR2(30),
  9.   OBJECT_NAME                     VARCHAR2(30),
  10.   OBJECT_INSTANCE                 NUMBER(38),
  11.   OBJECT_TYPE                     VARCHAR2(30),
  12.   OPTIMIZER                       VARCHAR2(255),
  13.   SEARCH_COLUMNS                  NUMBER,
  14.   ID                              NUMBER(38),
  15.   PARENT_ID                       NUMBER(38),
  16.   POSITION                        NUMBER(38),
  17.   COST                            NUMBER(38),
  18.   CARDINALITY                     NUMBER(38),
  19.   BYTES                           NUMBER(38),
  20.   OTHER_TAG                       VARCHAR2(255),
  21.   PARTITION_START                 VARCHAR2(255),
  22.   PARTITION_STOP                  VARCHAR2(255),
  23.   PARTITION_ID                    NUMBER(38),
  24.   OTHER                           LONG,
  25.   DISTRIBUTION                    VARCHAR2(30)
  26. );
  27.  
Regards
Veena
Jun 22 '08 #3
raviva
19
Thank you very much Veena it worked!!

regards,
Ravi

Hi,

First Create a Plan_Table, use the above said utility or you can run this :

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE PLAN_TABLE (
  2.   STATEMENT_ID                    VARCHAR2(30),
  3.   TIMESTAMP                       DATE,
  4.   REMARKS                         VARCHAR2(80),
  5.   OPERATION                       VARCHAR2(30),
  6.   OPTIONS                         VARCHAR2(30),
  7.   OBJECT_NODE                     VARCHAR2(128),
  8.   OBJECT_OWNER                    VARCHAR2(30),
  9.   OBJECT_NAME                     VARCHAR2(30),
  10.   OBJECT_INSTANCE                 NUMBER(38),
  11.   OBJECT_TYPE                     VARCHAR2(30),
  12.   OPTIMIZER                       VARCHAR2(255),
  13.   SEARCH_COLUMNS                  NUMBER,
  14.   ID                              NUMBER(38),
  15.   PARENT_ID                       NUMBER(38),
  16.   POSITION                        NUMBER(38),
  17.   COST                            NUMBER(38),
  18.   CARDINALITY                     NUMBER(38),
  19.   BYTES                           NUMBER(38),
  20.   OTHER_TAG                       VARCHAR2(255),
  21.   PARTITION_START                 VARCHAR2(255),
  22.   PARTITION_STOP                  VARCHAR2(255),
  23.   PARTITION_ID                    NUMBER(38),
  24.   OTHER                           LONG,
  25.   DISTRIBUTION                    VARCHAR2(30)
  26. );
  27.  
Regards
Veena
Jun 26 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Greg Stark | last post by:
This query is odd, it seems to be taking over a second according to my log_duration logs and according to psql's \timing numbers. However explain analyze says it's running in about a third of a...
14
by: Ina Schmitz | last post by:
Hello all, I don't succeed in displaying the explain plan. I use IBM DB2 Universal Database 8.2. I tried to do the example given in the online help for "Visual Explain". The tables...
4
by: marklawford | last post by:
Not having earned my DBA badge from the scouts just yet I'm a little lost with an error I'm getting. We've just upgraded our development database from 7.2 to 8.2 as the first step in upgrading...
0
by: JAW | last post by:
This plan seems like it should perform well. Does anyone see anything. SQL Statement Text: DECLARE MTR - RDG - EST - CSR CURSOR FOR
0
by: jfnorris | last post by:
I'm having some difficulty with Visual Explain. When I explain reletively simple sql, VE will generate an access plan. If I try to explain sql with several joins both outer and inner, or anthing more...
5
by: kabotnet | last post by:
Hi, I'm new in db2, I'm trying to execute EXPLAIN command on some queries but i have error like: And message similar to: Token EXPLAIN is not valid, valid tokens ( END GET SET CALL DROP FREE...
7
by: skaushik | last post by:
Hi all, I was working on a SQL query where a history table is joined with a small table to get some information. There is an index on the history table column but the explain plan tells that there...
2
by: uwcssa | last post by:
is there a way to see the actual (not just estimated) cost and cardinality at each plan operator? SQL Server and Oracle has such feature but I failed to find a way in DB2 yet (up to V9.5)
0
by: db2admin | last post by:
hello, I have compressed table 442992 rows and when i run explain plan on this table for some SQL using this table, i see table scan and cardinality on top of table node as 18458. I am new to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.