Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help: Temporary tables

Re: Help: Temporary tables

From: Gerard M. Averill <gaverill_at_chsra.wisc.edu>
Date: Fri, 09 Oct 98 17:07:58 GMT
Message-ID: <6vlfp6$2466$2@news.doit.wisc.edu>


In article <6vcsar$5i4$1_at_nnrp1.dejanews.com>, johnb_at_anvil.co.uk wrote:
>In sybase you can create a temporary table within a stored procedure and then
>use the temporary table in a query like any other table. Does oracle have the
>same feature ? if not how is this achieved.

Another approach I've used with good results uses dynamic SQL. At runtime I construct CREATE TABLE ... UNRECOVERABLE AS SELECT ... statements and submit them using the DBMS_SQL package. (The UNRECOVERABLE option prevents the statement from being logged in the redo logs, thus increasing performance.) While there is overhead associated with using dynamic SQL, I've found it far better iterating over cursors -- SQL's basis and strength is in manipulating sets after all -- especially when performing complex, multi-step calculations on large sets of data.



Gerard M. Averill, Associate Researcher CHSRA, University of Wisconsin - Madison GAverill_at_chsra.wisc.edu Received on Fri Oct 09 1998 - 12:07:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US