Home » RDBMS Server » Performance Tuning » no_index optimizer hint
no_index optimizer hint [message #115064] Thu, 07 April 2005 03:12 Go to next message
anmol1947
Messages: 34
Registered: February 2005
Location: Gurgaon
Member
Hi,

After putting no_index why this qury is using index for scan,same if i put name of the index in hint

SELECT /*+ no_index */
NVL (MAX (DUE_DATE), sysdate+10) FROM
CRA.PRECASH WHERE TREATY_NBR = 504 and
ENDORSEMENT_NBR = 0 and TREATY_YR = 2004 AND SOURCE_SYSTEM_CD = 2
/
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=15 Card=1 Bytes=17)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (BY INDEX ROWID) OF 'PRECASH' (Cost=15 Card
=1 Bytes=17)

3 2 INDEX (RANGE SCAN) OF 'PRECASH_N2' (NON-UNIQUE) (Cost=
138 Card=26)

[Updated on: Thu, 07 April 2005 05:51]

Report message to a moderator

Re: no_index optimizer hint [message #115089 is a reply to message #115064] Thu, 07 April 2005 06:36 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Read the manuals concerning hints. The syntax is:

SELECT /*+ no_index ( your_table the_index_name )*/
some_column
, another_column
...
FROM your_table
....

In your case, it would be:
SELECT /*+ no_index( PRECASH PRECASH_N2 ) */
...


MHE
Previous Topic: Selecting data out of a partition
Next Topic: To tune query
Goto Forum:
  


Current Time: Thu Mar 28 18:30:04 CDT 2024