Re: Using temporary tables for query results

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Sat, 14 Dec 2002 04:11:42 GMT
Message-ID: <2cyK9.346341$QZ.50917_at_sccrnsc02>


Creating and dropping a permanent table will make your application unscalable. In Oracle it is unlikely that you need to create a temp table or use one. (Just use SQL, Oracle is not SQL Server; they are about as different as you can get.)
Jim

"Doug Miller" <drmiller100_at_hotmail.com> wrote in message news:178db91.0212131221.407358f2_at_posting.google.com...
> sry_at_hotmail.com (situ) wrote in message
 news:<31c0a2d1.0212130255.5fc2f1ac_at_posting.google.com>...
>
> > Effectively, we are having to execute COMPLEX_QUERY_1 multiple times.
>
> Create a unique table name based upon the users login and datetime or
> something, write the results of complexquery1 to the "permanent"
> table, then use it to join and get the rest of the queries.
> Drop the "permanent" table when done.
>
> > Question:
> > Is there a more efficient approach than using Temporary tables?
>
> Maybe. depends on what the query really is.
>
> > Is this feature standardized across all databases? I read that
> > SQLServer deletes temp tables at the end of the transaction, while
> > Oracle does not. What are the performance-related implications of
> > using Temporary tables?
>
> basically, there are no performance differences between using temp
> tables and "permanent" tables that get dropped. There might be a teeny
> bit of overhead involved, but in the order of less then one second
> difference in response time for a big query.
>
> -doug miller
Received on Sat Dec 14 2002 - 05:11:42 CET

Original text of this message