SubQuerying Vs Joining
From: Awah Teh (awaht_at_digicentriq.com)
Date: 10/30/03
- Next message: Andrew J. Kelly: "Re: SubQuerying Vs Joining"
- Previous message: Jerry: "Re: Updating a User and giveing him access to different db"
- Next in thread: Andrew J. Kelly: "Re: SubQuerying Vs Joining"
- Reply: Andrew J. Kelly: "Re: SubQuerying Vs Joining"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 29 Oct 2003 15:49:19 -0800
Which is most effective (consider the query below for an example)?
Please give me some explanation (FMI:) as to why one is faster over the
other.
--Both Queries are designed to get the users information of users that
received passes in the Year of 2003
--** ***************
--** QUERY 1
--** ***************
Select * from users where user_id in (select user_id from
users_site_passes where date_pass_issued >= 'January 1, 2003')
--** ***************
--** QUERY 2
--** ***************
Select users.* from users, users_site_passes where users.user_id =
users_site_passes.user_id and users_site_passes.date_pass_issued >= 'January
1, 2003'
Thanks In Advance
A-
-- Awah Teh Chief Executive Officer DigicentriQ Technologies, LLC awaht@digicentriq.com www.digicentriq.com 877 675 4742 805 732 9421
- Next message: Andrew J. Kelly: "Re: SubQuerying Vs Joining"
- Previous message: Jerry: "Re: Updating a User and giveing him access to different db"
- Next in thread: Andrew J. Kelly: "Re: SubQuerying Vs Joining"
- Reply: Andrew J. Kelly: "Re: SubQuerying Vs Joining"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|