List:General Discussion« Previous MessageNext Message »
From:Perrin Harkins Date:February 11 2008 6:51pm
Subject:Re: Inefficient query processing?
View as plain text  
On Feb 10, 2008 5:30 PM, Yves Goergen <nospam.list@stripped> wrote:
> My problem is that the sub-select in line 7 ("SELECT 1") takes a rather
> long time. (When I remove it, it's much faster.)

This is a known issue with EXISTS/NOT EXISTS subqueries in MySQL,
which has some fixes slated for MySQL 6.  In the meantime, there are
ways to rewrite most of these queries using JOIN/LEFT JOIN.  Read some
of the articles on http://xaprb.com/ about subqueries for a more
detailed explanation and examples of rewrites.

- Perrin
Thread
Inefficient query processing?Yves Goergen10 Feb
  • Re: Inefficient query processing?Peter Brawley11 Feb
    • Re: Inefficient query processing?Yves Goergen11 Feb
      • Re: Inefficient query processing?Peter Brawley11 Feb
        • Re: Inefficient query processing?Yves Goergen11 Feb
          • Re: Inefficient query processing?Peter Brawley11 Feb
            • Re: Inefficient query processing?Yves Goergen11 Feb
              • Re: Inefficient query processing?Peter Brawley11 Feb
                • Re: Inefficient query processing?Yves Goergen11 Feb
  • Re: Inefficient query processing?Perrin Harkins11 Feb
    • Re: Inefficient query processing?Yves Goergen11 Feb
      • Re: Inefficient query processing?Perrin Harkins11 Feb
      • Re: Inefficient query processing?Peter Brawley11 Feb