Subject Re: [firebird-support] How to empty a large table?
Author Helen Borrie
At 05:01 PM 9/10/2009, you wrote:
>I am running into problems when emptying a "large" table (some 80000
>records of 4 KB each - not so large, but significantly larger than any
>other table in my database).
>
>1) DELETE FROM Table takes a long time (3 minutes on this test run)
>2) Further backups can take forever when they encounter this table, even
>though it doesn't contain any more data.
>
>This problem was multiplied once when, for some reason, my table-filling
>tool entered an infinite loop and inserted 2.5 million records before I
>stopped it. DELETE was reasonably fast back then (several minutes), but
>I couldn't do a backup at all - I started it friday evening and on
>monday morning, when I needed to use the database again, wasn't finished
>- I was still hung up on that deleted table.
>
>The questions is: Can I empty the table in any way which would not lead
>to these two problems?
>
>I am using Firebird 1.5.5 locally on Windows XP in superserver mode.

Drop the table and then recreate it all new, fresh and empty. That also saves you from accumulating any garbage from those big batch deletes.

./heLen