Re: Drop a table via synonym

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 30 Nov 2006 16:46:16 -0800
Message-ID: <1164933973.178109_at_bubbleator.drizzle.com>


nicetom786_at_yahoo.com wrote:
> Thanks for yor reply.
> As per design,The procedure should drop the table and create the table
> each time when run.
>
> drop table A
> create table A as select * from table B where 1=2;
>
> So a synonym will not help in this case......
> Pls advise.

This may be the only strategy in some databases but it is not the only one in Oracle ... it is a bad one.

Look into using a GLOBAL TEMPORARY table. There are two types ... one that empties itself ON COMMIT and another that empties itself at the end of the session.

Either will give you substantially better performance and scalability.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Dec 01 2006 - 01:46:16 CET

Original text of this message