Tuesday, August 21, 2018

Oracle index hint syntax



Oracle index hint syntax


select /*+ index(customer cust_primary_key_idx) */ * from customer;

Also note that of you alias the table, you must use the alias in the index hint:
select /*+ index(c cust_primary_key_idx) */ * from customer c;

Also, be vary of issuing hints that conflict with an index hint.  In this index hint example, the full hint is not consistent with an index hint:
select /*+ full(c) index(c cust_primary_key_idx) */ * from customer c;


https://docs.oracle.com/cd/B19306_01/server.102/b14211/hintsref.htm#i8327
https://logicalread.com/using-index-hints-to-tune-oracle-performance-h01/#.W3zv984zbIU

No comments:

Post a Comment

AWS how to delete VPC when it has error with Network interface , Gateway decencies

   how to delete VPC when it has error with Network interface , Gateway decencies  in AWS 1. Check if it is running on EC2 instance then Sto...