Unix Technical Forum

Dependent Subquery?

This is a discussion on Dependent Subquery? within the MySQL forums, part of the Database Server Software category; --> Hi, why is this subquery dependent? SELECT * FROM SYSlogs.pflog WHERE chargedomain IN (SELECT target FROM SYSconf.aliasdomains WHERE name ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:30 AM
=?ISO-8859-1?B?QW5kcukgSORuc2Vs?=
 
Posts: n/a
Default Dependent Subquery?

Hi,

why is this subquery dependent?

SELECT * FROM SYSlogs.pflog WHERE chargedomain IN (SELECT target FROM
SYSconf.aliasdomains WHERE name IN ('xxx','yyy','zzz')) OR
chargedomain=0

1 | PRIMARY | pflog | ALL | chargedomain | NULL | NULL | NULL |
5659150 | Using where
2 | DEPENDENT SUBQUERY | aliasdomains | ALL | name | NULL | NULL |
NULL | 92 | Using where

Regards,
André
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 11:30 AM
Captain Paralytic
 
Posts: n/a
Default Re: Dependent Subquery?

On 5 Dec, 23:20, "André Hänsel" <an...@webkr.de> wrote:
> Hi,
>
> why is this subquery dependent?
>
> SELECT * FROM SYSlogs.pflog WHERE chargedomain IN (SELECT target FROM
> SYSconf.aliasdomains WHERE name IN ('xxx','yyy','zzz')) OR
> chargedomain=0
>
> 1 | PRIMARY | pflog | ALL | chargedomain | NULL | NULL | NULL |
> 5659150 | Using where
> 2 | DEPENDENT SUBQUERY | aliasdomains | ALL | name | NULL | NULL |
> NULL | 92 | Using where
>
> Regards,
> André


I don't know, but why are you using a subquery when a JOIN is far
superior?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:42 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com