optimizing join query statement

From: Binh H. Tran <binh_at_cod.nosc.mil>
Date: 1995/11/08
Message-ID: <1995Nov8.231406.13755_at_nosc.mil>#1/1


Hi All:

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)    

The problem with this is it takes way too long (>10 minutes) to produce the result. I created a few indices for the three tables, but It didn't seem to improve the performance at all.

Any suggestions?

Thanks,

binh_at_nosc.mil Received on Wed Nov 08 1995 - 00:00:00 CET

Original text of this message