Re: Big tables

From: Raimundo Lozano <rlozano_at_medicina.ub.es>
Date: 2000/02/21
Message-ID: <38B102E4.A6E144A0_at_medicina.ub.es>#1/1


Heinz Huber wrote:

> Do you mean to say that the tables are not joined? A cartesian product
> is calculated?
>
> Every table that is joined to another is involved in the selection
> criteria!
>
> Heinz

Sorry Heinz. I'm afraid I have not explained the problem with clarity. The tables are joined but there are few conditions on the big tables. It's some like:

SELECT .........

FROM table1,        (+ 1000000 of rows)
            table2,        (+ 1000000 of rows)
            table3,        (+ 1000000 of rows)
            table4,        (+ 1000000 of rows)
            table5,        (+ 1000000 of rows)
            table6,
            table7,
            table8,
            table9,
            table10
WERE (table1.attribute1 *= table2.attribute1) and

(table3.attribute3 *= table6.attribute3) and
(table3.attribute4 *= table7.attribute4) and
(table5.attribute5 = table4.attribute5) and
(table3.attribute6 = table4.attribute6) and
(table5.attribute1 = table1.attribute1) and
(table1.attribute8 = table8.attribute8) and
(table9.attribute9 = table10.attribute9) and
(table10.attribute10 = table4.attribute10) and
(table4.attribute11 = "foo") and
(table10.date >= date1) and
(table10.date <= date2)

Although the DBMS don't calculate the cartesian product there are few ways of reduce the amount of rows to deal with, and I wonder the database design is correct for a transactional system

Raimundo Lozano Received on Mon Feb 21 2000 - 00:00:00 CET

Original text of this message