-
Why is Oracle not using the damn index
-
1. You forgot to analyze the table.
2. Your query is returning too many rows
3. You are specifying the second field of a multi-column index
4. you are trying to select a null value
5. you have a hint in your query the overrides the optimizer
6. your sql requires an implicit type conversion
7. your table is too small to use an index.
More details would be helpful. What's the query? What are the table structures involved? What is representitive data?
Jeff Hunter
-
Use explain plan to find out the executing path. Next step is to re-write the query with an optimizer hint. Run explain plan again.
If you do not see the index you want being used, re-write the index. Make sure that the index refers to a column in the where clause. Oracle many not use index in the following situations: WHERE clause with subquery,GROUP BY, aggregate functions, DISTINCT, ROWNUM, or CONNECT BY/START WITH.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|