Subject | ODP: [firebird-support] Best way to delete millions of rows |
---|---|
Author | liviuslivius |
Post date | 2016-10-31T07:58:13Z |
-------- Oryginalna wiadomość --------
Od: "kragh.thomas@... [firebird-support]" <firebird-support@yahoogroups.com>
Data: 29.10.2016 16:53 (GMT+01:00)
Do: firebird-support@yahoogroups.com
Temat: [firebird-support] Best way to delete millions of rows
Hey
I have a database that needs some cleanup, in some tables i need to delete millions of rows. I performed the cleanup on a copy of the production database in a development environment, using:
delete from table where created < dateadd(-6 month to current_date)
followed by a count(*) on the table
I know that this causes massive garbage collection, however all other attachments to the database, and all attachments to other databases on the same server stopped working, and no new attachments could be created until the count was completed.
So my question is:
Is this considered a bug in Firebird? Especially because users that did not access the table, and users of other databases on the server was affected?
And how can i perform the delete on the production server without affecting users? When the database is used 24/7 and the tables i need to delete from are frequently accessed by users?&nbs p;
The server is 2.5.5 running on CentOs - Running super classic.
Best regards Thomas