Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: purging old data
Hi,
Have you considered the following:
CREATE new_table AS SELECT * FROM real_table WHERE ... TRUNCATE TABLE real_table INSERT INTO real_table SELECT * FROM new_table
or:
CREATE new_table AS SELECT * FROM real_table WHERE ... DROP TABLE real_table ALTER TABLE new_table RENAME TO real_table
regards
Jerry Gitomer
Anurag Minocha wrote in message
<37D63DE7.B04D2DC9_at_synergy-infotech.com>...
>Thanks for the help.
>
>The problem I am having is that i have to purge data based on a
query and
>truncate doesnt support that hence i will have to delete the
records. The reason
>i am purging the data is because the queries will run faster if
there are less
>number of records , but deleting wont help because oracle will
go till the high
>water mark and then produce the result. How do i use the delete
command and make
>my queries run faster on my tables.
>
>
>Thanks
>Anurag
>
>also reply to
>anurag_at_synergy-infotech.com
>
>Mario Bucsics wrote:
>
>> One way to do this is to disable the constraint that points
>> on that table and after delete or truncate enable it.
>>
>> Mario Bucsics
>>
>> * Sent from RemarQ http://www.remarq.com The Internet's
Discussion Network *
>> The fastest and easiest way to search and participate in
Usenet - Free!
>
>
>
Received on Wed Sep 08 1999 - 08:05:22 CDT
![]() |
![]() |