Home » RDBMS Server » Performance Tuning » trace level for query
trace level for query [message #127871] Wed, 13 July 2005 16:29 Go to next message
Hina
Messages: 51
Registered: April 2004
Member
How to see the actual value instead of 'SYS_B_4, SYS_B_5' in following query.

select analyst_id, company_name, region
from analyst
where company_id in (":SYS_B_4",":SYS_B_5")

I need to use this query in explain plan for optimization.

Note: trace level is 12

Thanks
Re: trace level for query [message #127982 is a reply to message #127871] Thu, 14 July 2005 08:15 Go to previous message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Are you sure?

MYDBA@ORCL > create table test(a number, b char(100));

Table created.

MYDBA@ORCL > insert into test select rownum, 'x' from all_objects where rownum <= 10000;

10000 rows created.

MYDBA@ORCL > explain plan for select * from test where a = :1;

Explained.

MYDBA@ORCL > select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------

Plan hash value: 1357081020

--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |   117 | 13455 |     2   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| TEST |   117 | 13455 |     2   (0)| 00:00:01 |
--------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - filter("A"=TO_NUMBER(:1))

Note
-----
   - dynamic sampling used for this statement

17 rows selected.

MYDBA@ORCL >

Previous Topic: Configuring the database parameters
Next Topic: Extracting CPU data from statspack tables
Goto Forum:
  


Current Time: Sun Jan 17 12:30:48 CST 2021