How to break up a big transaction?
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi all, I'd need perform a huge delete operation (about million rows). I wouldn't like to add several logs for this single transaction that will be run very rarely. So how can I break up a delete operation so that it would do commit e.g. after every 5000 rows? I was told that I could use dbloader but is there any way to do it from SPL or C/ESQL script? Any help would make me most grateful. Best Regards Lena Sent via Deja.com http://www.deja.com/ Before you buy.
Hello Lena
If you can do so, take away the logging of your database. by ontape -s
-L 0 -N <DBNAME>.
By doing this no log is written for your huge delete.
After you have to change it back by doing ontape -s -L 0 -B <DBNAME> or
ontape -s -L 0 -U <DBNAME>, as it was before.
To wait not so long to the Level 0 Archive you can set TAPEDEV to
/dev/null.
lena_peltonen@my-deja.com schrieb:
> Hi all,
>
> I'd need perform a huge delete operation
> (about million rows). I wouldn't like to add several logs
> for this single transaction that will be run very rarely.
>
> So how can I break up a delete operation so that it would do
> commit e.g. after every 5000 rows?
>
> I was told that I could use dbloader but is there any way to do it
> from SPL or C/ESQL script?
>
> Any help would make me most grateful.
>
> Best Regards
>
> Lena
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.