Re: Query optimization on large table - Temporary tables ?
From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Mon, 03 Mar 2003 15:20:33 GMT
Message-ID: <5pK8a.338478$be.315921_at_rwcrnsc53>
Date: Mon, 03 Mar 2003 15:20:33 GMT
Message-ID: <5pK8a.338478$be.315921_at_rwcrnsc53>
Best to try it. That will tell you what would be most effective. I don't
think you need the temp table, but try it with Oracle's global temp tables
and as a straight query.
Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "Marcos Pinto" <marcosc_at_gmx.de> wrote in message news:2ed49883.0303030414.3f71d2a4_at_posting.google.com...Received on Mon Mar 03 2003 - 16:20:33 CET
> 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.
> - Would using Oracle 8i temporary tables instead of regular tables
> improve the performance somehow ?
>
> Thanks in advance,
>
> Marcos Pinto
> marcosc_at_gmx.de