[prev in list] [next in list] [prev in thread] [next in thread] 

List:       msql
Subject:    [mSQL] Which search is faster?
From:       garyb () fxt ! com (Gary Bickford)
Date:       1996-08-30 10:19:59
[Download RAW message or body]

Folks,
Does the order of queries matter with regard to speed?  For instance, if
table books has 10,000 records (big), and table refer has 1000 records
(little), does it matter which of the following I use?  isbn is the primary
key in both.

[I've messed with the order of the first and last parts of the query]

SELECT books.isbn,refer.isbn,books.otherstuff,refer.otherstuff from
books,refer where books.isbn=refer.isbn AND otherstuff...

SELECT refer.isbn,books.isbn,books.otherstuff,refer.otherstuff from
books,refer where books.isbn=refer.isbn AND otherstuff...

SELECT books.isbn,refer.isbn,books.otherstuff,refer.otherstuff from
books,refer where refer.isbn=books.isbn AND otherstuff...

SELECT refer.isbn,books.isbn,books.otherstuff,refer.otherstuff from
books,refer where refer.isbn=books.isbn AND otherstuff...

Thanks!

        |        end
      --+--      Gary Bickford <garyb@fxt.com>
        |        FXT Corp. / Informat Communications
        |        541-923-3060
        |        fax 541-923-5537


--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to msql-list-request@bunyip.com.  Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic