Re:Query optimization in MySQL with Subqueries
by chopsueyar on Friday February 11, 2011 @09:33AM
(#2206406)
Getting rid of the 'IN' clause.
[ Parent
| on HN ]
Re:Query optimization in MySQL with Subqueries
by Herald_MJ on Friday February 11, 2011 @10:15AM
(#2206541)
exactly. Using an IN statement with a subquery is textbook "how to make a query slow" - it forces a sequential scan. No-one who understands SQL would write a query like that.