List:General Discussion« Previous MessageNext Message »
From:Kevin Burton Date:June 7 2005 10:36pm
Subject:Re: Seriously.. When are we going to get subqueries?!
View as plain text  
DBA wrote:

>----- Original Message ----- 
>From: "Kevin Burton" <burton@stripped>
>To: <greg@stripped>
>Cc: <mysql@stripped>
>Sent: Tuesday, June 07, 2005 6:11 PM
>Subject: Re: Seriously.. When are we going to get subqueries?!
>
>
>  
>
>>Greg Whalin wrote:
>>
>>    
>>
>>>They do use indexes if you use them to build derived tables and are 
>>>pretty fast.  The only case where I see them not using indexes when I 
>>>think they should is when you use a sub-query for an IN() clause.
>>>      
>>>
>>I'm sorry.. yes.. They're not using indexes when within IN clauses which 
>>for me is 99.9% of the time.
>>
>>Maybe I'm wrong though and this is a rare but I don't think so...
>>
>>Kevin
>>    
>>
>
>I use subqueries and I thought that it was using the index? I might be wrong? This is
> MySQL on 4.1.11-nt. Here is the explain plan:
>
>  
>
Nope... its a bit confusing but no... it's not.  The subquery ITSELF is 
using queries but the parent query which is using your

ptt_trans_06 


table is not ...

Notice the Type: ALL and Key: NULL

Luckly though you only have 21k rows so its not that big of a deal.

KEvin

-- 


Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com. 
See irc.freenode.net #rojo if you want to chat.

Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html

   Kevin A. Burton, Location - San Francisco, CA
      AIM/YIM - sfburtonator,  Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 

Thread
Seriously.. When are we going to get subqueries?!Kevin Burton7 Jun
  • Re: Seriously.. When are we going to get subqueries?!Greg Whalin7 Jun
    • Re: Seriously.. When are we going to get subqueries?!Kevin Burton8 Jun
  • Re: Seriously.. When are we going to get subqueries?!DBA8 Jun
    • Re: Seriously.. When are we going to get subqueries?!Kevin Burton8 Jun
  • Re: Seriously.. When are we going to get subqueries?!Jeff Smelser8 Jun
    • Re: Seriously.. When are we going to get subqueries?!Dan Nelson8 Jun
      • Re: Seriously.. When are we going to get subqueries?!Jeff Smelser8 Jun
        • Re: Seriously.. When are we going to get subqueries?!Kevin Burton9 Jun
          • Re: Seriously.. When are we going to get subqueries?!Jochem van Dieten9 Jun
            • Re: Seriously.. When are we going to get subqueries?!Kevin Burton10 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard8 Jun
  • Re: Seriously.. When are we going to get subqueries?!Jeff Smelser8 Jun
  • Re: Seriously.. When are we going to get subqueries?!Martijn Tonies8 Jun
  • RE: Seriously.. When are we going to get subqueries?!George Sexton9 Jun
    • Re: Seriously.. When are we going to get subqueries?!Jeff Smelser9 Jun
    • Re: Seriously.. When are we going to get subqueries?!Josh Trutwin9 Jun
    • Re: Seriously.. When are we going to get subqueries?!Keith Ivey9 Jun
      • Re: Seriously.. When are we going to get subqueries?!Jochem van Dieten9 Jun
      • Re: Seriously.. When are we going to get subqueries?!George L. Sexton9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard8 Jun
  • Re: Seriously.. When are we going to get subqueries?!Jeff Smelser8 Jun
  • Re: Seriously.. When are we going to get subqueries?!Greg Whalin8 Jun
    • Re: Seriously.. When are we going to get subqueries?!Kevin Burton9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard8 Jun
RE: Seriously.. When are we going to get subqueries?!PMilanese8 Jun
Re: Seriously.. When are we going to get subqueries?!Bob_Savard8 Jun
  • Re: Seriously.. When are we going to get subqueries?!Boyd Lynn Gerber9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard9 Jun
  • Re: Seriously.. When are we going to get subqueries?!Gordan Bobic9 Jun
  • RE: Seriously.. When are we going to get subqueries?!George Sexton9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard9 Jun
  • Re: Seriously.. When are we going to get subqueries?!Gordan Bobic9 Jun
    • Re: Seriously.. When are we going to get subqueries?!Josh Trutwin9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard9 Jun
  • Re: Seriously.. When are we going to get subqueries?!Gordan Bobic9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard9 Jun
  • RE: Seriously.. When are we going to get subqueries?!George Sexton9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard9 Jun
  • RE: Seriously.. When are we going to get subqueries?!George Sexton9 Jun
    • Re: Seriously.. When are we going to get subqueries?!Jeff Smelser9 Jun
      • Re: Seriously.. When are we going to get subqueries?!George L. Sexton9 Jun
        • Re: Seriously.. When are we going to get subqueries?!Roger B.A. Klorese 9 Jun
          • Re: Seriously.. When are we going to get subqueries?!Jochem van Dieten9 Jun
        • Re: Seriously.. When are we going to get subqueries?!Jeff Smelser9 Jun
          • Re: Seriously.. When are we going to get subqueries?!Greg Whalin9 Jun
            • Re: Seriously.. When are we going to get subqueries?!daniel9 Jun
              • Re: Seriously.. When are we going to get subqueries?!Jochem van Dieten9 Jun
  • Re: Seriously.. When are we going to get subqueries?!David Griffiths9 Jun
    • RE: Seriously.. When are we going to get subqueries?!J.R. Bullington9 Jun
Re: Seriously.. When are we going to get subqueries?!George L. Sexton9 Jun
RE: Seriously.. When are we going to get subqueries?!Bob)9 Jun
  • Re: Seriously.. When are we going to get subqueries?!Jochem van Dieten9 Jun
RE: Seriously.. When are we going to get subqueries?!Jay Blanchard9 Jun
RE: Seriously.. When are we going to get subqueries?!Gordon Bruce9 Jun
  • Timestamp and it's usage (Re: Seriously.. When are we going to get subqueries?!)Martijn Tonies9 Jun
    • Re: Timestamp and it's usage (Re: Seriously.. When are we going to get subqueries?!)Jochem van Dieten9 Jun
  • Re: Timestamp and it's usage (Re: Seriously.. When are we going to get subqueries?!)Martijn Tonies9 Jun