Re: Big tables

From: Heinz Huber <Heinz.Huber_at_elbanet.co.at>
Date: 2000/02/16
Message-ID: <38AAA00D.B10F63D1_at_elbanet.co.at>#1/1


Hi!

Raimundo Lozano wrote:
>
> I don't have much experience with big tables that contain millions of
> rows. So, my concern is how to manage joins between many of such tables.
> I think there are two possible solutions:
> - At the level of the database structure: To split the tables by some
> attribute for deal with smaller ones.
> - At the level of SQL sentences: To divide one sentence that contain the
> join in many steps, using temporary tables, etc.

I think the most important issue in dealing with largly populated tables and also with a big number of joins are indexes. Given good selectivity, the right indexes should speed queries (and joins) up big time.

If you split the tables, you'll run into trouble whenever the query does not match the attribute you chose for the split. Then you have to access more than one table as if it were one. Alternativly, you could execute the same query on all the small tables and build up a (temporary) result table.

Splitting the queries (at least that's what I think you meant by the term sentence) in more than one might help, if you choose the right joins for the intermediate results and if you have indexes on your temporary tables.

Heinz Received on Wed Feb 16 2000 - 00:00:00 CET

Original text of this message