Subject Delete all recs or drop & recreate table?
Author Kjell Rilbe

What is generally most efficient - to delete all records in a table or
to drop it and recreate it?

The table in question has 50-60 columns varying in size from char(1) and
int to varchar(80). It holds about 1 million records. About 25 of the
columns are indexed. Firebird 1.5.

After being emptied, the table will be filled again with similar (but
updated) data from a couple of external sources.

I want to minimize the time it takes to empty the table. I generally
drop indices, delete all records, insert new data, create indices.

Would it be better to drop table, recreate table, insert new data,
create indices?

Should I do a sweep after emptying the table? Backup + restore?

This batch is executed 1-2 times a month.

Thank you,
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64