View Single Post

   
  #10 (permalink)  
Old 02-27-2008, 05:41 AM
Serge Rielau
 
Posts: n/a
Default Re: Deleting data from table

Knut Stolze wrote:
> Serge Rielau wrote:
>
>
>>bikkaran@in.ibm.com wrote:
>>
>>>I have a table that contains 15lakh records.....
>>>I want delete that table....and insert fresh set of record.
>>>
>>>when I run the command ...db2 "delete from schema.tabname"
>>>it hangs .......the system it seems hangs...
>>>
>>>Is their a better way out to delete the data..

>
>
>>ALTER TABLE T ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE;
>>COMMIT;

>
>
> Now that is a cool way to do the truncation. ;-)
>

Indeed. Widely unknown for some uncomprehensible reason.
Folks keep yacking about TRUNCATE TABLE and 90% of what it does is
right there....

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
DB2 UDB for Linux, Unix, Windows
IBM Toronto Lab
Reply With Quote