Re: Query optimization on large table - Temporary tables ?

From: Alex Filonov <afilonov_at_yahoo.com>
Date: 4 Mar 2003 09:01:44 -0800
Message-ID: <336da121.0303040901.2235a165_at_posting.google.com>


marcosc_at_gmx.de (Marcos Pinto) wrote in message news:<2ed49883.0303030414.3f71d2a4_at_posting.google.com>...
> Hi all,
>
> I happened to receive a big PL/SQL code to mantain, that does
> something like the following:
>
> - Loop through a long list of customer records
> -- For each customer record, copy a few records from a huge table
> (100 million records aprox.) to a temporary table (not Oracle 8i's
> temp table, just a regular table)
> -- Run two heavy queries on these records
> -- Write some stuff to another table, if necessary
>
> Therefore, my questions are:
>
> - Is there a point in copying the records from the big table to a
> temporary one ? These records are accessed through primary key.

There is no point. This is a clear case for PL/SQL tables. That is, if you are sure that only a few records are used.

> - Would using Oracle 8i temporary tables instead of regular tables
> improve the performance somehow ?
>
> Thanks in advance,
>
> Marcos Pinto
> marcosc_at_gmx.de
Received on Tue Mar 04 2003 - 18:01:44 CET

Original text of this message