Re: optimizing join query statement

From: Snufupagus <snufupagus_at_aol.com>
Date: 1995/11/28
Message-ID: <49ej7f$eog_at_newsbf02.news.aol.com>#1/1


I need help on optimizing a join select statement.
|> What I have are three tables A, B, and C with
|> 112,000, 11,000, and 5,00 records, respectively.
|>
|> Currently, the select statement we have is:
|>
|> select count(distinct A.rowid) from A, B, C where
|> (A.column1 = B.column1 and A.column2 = C.column2 and
|> A.column3 = B.column3 and A.column4 = C.column4)

Sometimes changing the order of tables by putting the smallest table first in your from statement will speed up a query.

Try select count(distinct A.rowid) from C,B,A where etc. Received on Tue Nov 28 1995 - 00:00:00 CET

Original text of this message