What is oracle hint? how do we use hints in SQL for the optimization of the query?

Showing Answers 1 - 3 of 3 Answers

John Thomas Ambadan

  • Dec 5th, 2006
 

Hint are used to alter execution plans of SQL statements. by using hints you will be able to choose the execution plans.

for eg. in a SELECT statement your will be able to specify whether an index is to be used or not . If you want to use and index, You can also specify which index is to  be used.

The following query won't use any index even if there is an index on name.

SELECT /*+ FULL(e) */ id, name
  FROM employees e
  WHERE name LIKE 'J%';

The above query will give you better results if the names starting with 'J' are more than 25% of total rows.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions