Why is my index not being used?
- where surname != 'FRASER'
- where upper(surname) = 'FRASER'
- where surname is null
- where surname like '%FRASER'
- small tables
- histograms:
90% rows 'Yes'
1% rows 'No'
1% 'Maybe'
1% 'Not in'
1% 'Later'
where answer = 'Yes'
----> IN is faster than EXISTS for subqueries that return few rows.
----> EXISTS is faster than IN for subqueries that return many rows.
----> EXISTS is faster than IN for subqueries that return many rows.
No comments:
Post a Comment