SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Mar 2003
    Location
    Melbourne, Australia
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    speed - WHERE IN () vs select from subquery

    hi all

    would a where in clause be faster or slower than using a select from (select)?

    now keep in mind that the recordset to be selecting from may be up to 1500 or more

    eg. where userID in (1, 2, 3, 4,..., 1000)

    also, there may be many more parts to the where clause
    that may be inside and outside the subquery
    hope that makes sense

    any advice
    thanks
    dave

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,274
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    some food for thought: How to Misuse SQL's FROM Clause
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Evangelist
    Join Date
    Mar 2003
    Location
    Melbourne, Australia
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    interesting, well i won't pretend like i understood everything there
    but hopefully i can use what i can in the future
    thanks again


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •