On Thu, Feb 25, 2010 at 8:48 AM, Dan Nelson dnel...@allantgroup.com wrote:
IN is fine ( for example ... WHERE field1 IN (1,2,3,4,5,6) is extremely
efficient); it's subqueries in general that are killers.
If the dependent subquery is nothing but index lookups, it's still blazingly
fast, though
On Thu, Feb 25, 2010 at 2:48 AM, Dan Nelson dnel...@allantgroup.com wrote:
IN is fine ( for example ... WHERE field1 IN (1,2,3,4,5,6) is extremely
efficient);
Yes, I meant to say IN/NOT IN subqueries, not value lists.
it's subqueries in general that are killers.
Subqueries in the FROM clause
Hello,
On Wed, Feb 24, 2010 at 10:11 AM, Yang Zhang yanghates...@gmail.com wrote:
I have the following query. Note that the nested query has no
dependencies on the outer one, yet mysql reports it as dependent.
Do an EXPLAIN EXTENDED followed by SHOW WARNINGS. You will see the
optimization
I have the following query. Note that the nested query has no
dependencies on the outer one, yet mysql reports it as dependent.
Furthermore, it says the join type is an ALL (nested loop join, the
slowest possible one, in which each row of the outer table results in
a complete inner table scan),
On Wed, Feb 24, 2010 at 10:11 AM, Yang Zhang yanghates...@gmail.com wrote:
Any ideas on
how to optimize this by convincing mysql to see the independence use a
const join?
http://www.xaprb.com/blog/2006/04/30/how-to-optimize-subqueries-and-joins-in-mysql/
You need to rewrite as a join or use a
In the last episode (Feb 24), Perrin Harkins said:
On Wed, Feb 24, 2010 at 10:11 AM, Yang Zhang yanghates...@gmail.com wrote:
Any ideas on how to optimize this by convincing mysql to see the
independence use a const join?