Subject RE: [firebird-support] MASSIVE DELETIONS
Author Puigsegur, Jordi
Thanks for your answers.

The worst table has around 25 million records, of which 7-10 million
need to be deleted. For what you say it seems that the best option is to
drop the index, delete the records and recreate the index. I'll try



[] On Behalf Of Brenden Walker
Sent: Tuesday, May 29, 2007 8:51 PM
Subject: RE: [firebird-support] MASSIVE DELETIONS

> -----Original Message-----
> From:
> [
<> ] On Behalf Of
> Puigsegur, Jordi
> Which is the best way to perform a massive deletion on a
> table with million of rows ?
> In other environments we first perfom a select to gather the
> dbkeys of the records to be deleted and then delete them
> performing commits every n records. Is there something
> similar in Firebird ?

I think a lot depends on how massive the deletion. If I need to keep a
small percentage of records, I find that copying them to a temporary
table (possibly external) and then dropping/recreating the original
source table works very well. Dropping tables takes hardly any time.

[Non-text portions of this message have been removed]