Subject | Performance when deleting a lot of records |
---|---|
Author | Christian Kaufmann |
Post date | 2005-03-29T06:23:10Z |
Hi,
I have a redundant table, that is rebuilt by a background task.
Currently the table contains about 2 million records and when
rebuilding it, this is done in transactions of 5000-50000 records at
the same time. This means, all these records are deleted and new
records are inserted.
The table has about six indexes.
When I do a backup after the calculation, it takes very long to backup
this table. If I understand Firebird correctly, the records are
effectively deleted at that time and indexes are updated not before
now.
Would it help, if indexes are deactivated during my task? The problem
is, that the database is live available on the internet and if a
deactivate the indexes, pages are rebuilt just too slow.
Any advices are welcome or maybe there is a website or a book, where
such problems and solutions for it are discussed.
cu Christian
I have a redundant table, that is rebuilt by a background task.
Currently the table contains about 2 million records and when
rebuilding it, this is done in transactions of 5000-50000 records at
the same time. This means, all these records are deleted and new
records are inserted.
The table has about six indexes.
When I do a backup after the calculation, it takes very long to backup
this table. If I understand Firebird correctly, the records are
effectively deleted at that time and indexes are updated not before
now.
Would it help, if indexes are deactivated during my task? The problem
is, that the database is live available on the internet and if a
deactivate the indexes, pages are rebuilt just too slow.
Any advices are welcome or maybe there is a website or a book, where
such problems and solutions for it are discussed.
cu Christian