high cost [message #334699] |
Thu, 17 July 2008 13:25 |
balaji1482
Messages: 312 Registered: July 2007 Location: INDIA
|
Senior Member |
|
|
hi oracle experts,
i have found this query having high cost.can anybody let me khow how to tune this query?
what are the steps required to reduce the cost of a query?
SELECT POLH_SYS_ID , POLH_END_NO_IDX , POLH_END_SR_NO FROM testlive WHERE NVL(POLH_NO , :"SYS_B_0" ) = NVL(:1 , :"SYS_B_1" ) AND NVL(POLH_END_NO , :"SYS_B_2" ) = NVL(:1 , :"SYS_B_3" )
Operation Object Name Rows Bytes Cost
SELECT STATEMENT Hint=ALL_ROWS 1 170164
PARTITION LIST ALL 1 ; 39 170164
TABLE ACCESS FULL PGITH_POLICY 1 39 170164
Regards,
Balaji
|
|
|
|
|
|
Re: high cost [message #334800 is a reply to message #334758] |
Fri, 18 July 2008 01:12 |
rsoma
Messages: 15 Registered: April 2005 Location: Chennai, India
|
Junior Member |
|
|
If you are using TOAD, then you can see in the table properties under stat tab.
|
|
|
|
|
|
|
|
|
Re: high cost [message #335184 is a reply to message #334699] |
Mon, 21 July 2008 06:25 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
You can't create a function based index on the functions that you are using.
If your query had a clause in it likeAND NVL(POLH_NO,'XYZ')= NVL(:1 , :"SYS_B_1" ) then you could create a function based index on NVL(POLH_NO,'XYZ').
As it is, it looks like you're passing in a bind variable the NVL statement, so there is no way of creating in index on it as you do not know in advance what the value for all null columns should be.
|
|
|
|