×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Backup after large deletion extremely slow/looping?

Backup after large deletion extremely slow/looping?

Backup after large deletion extremely slow/looping?

(OP)
I am having problems deleting 1.6 million records from my Interbase 4.0 database.  The records contain BLOB data.  

A backup run before the deletion completed in an hour.  After the deletion, the backup ran for four hours and then I had to kill it.  I ran data validations before and after the deletion and there was no corruption found.  The deletion took 20 minutes to complete and showed no problems.  I cannot determine whether there is a problem with the backup process or it just takes that long.

Any help is greatly appreciated.

RE: Backup after large deletion extremely slow/looping?

Hi,

Turn OFF garbage collection during the backup process - it will speed up the backup. However, "garbage" (old record data) needs to be deleted - this will be done when the user does, for example, a SELECT * FROM tablewhereyoudeletedalargenumberofrows ... InterBase 6 and 7 have several improvements related to the garbage collection process.

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.upscene.com

RE: Backup after large deletion extremely slow/looping?

(OP)
Thank you for your response.

Does that mean that the backup after the purge is working correctly, even though it is taking forever?

RE: Backup after large deletion extremely slow/looping?

Yes, it should work... But the problem is the time - if you want "just" to back up, turn OFF garbage collection. The database will continue to function...

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.upscene.com

RE: Backup after large deletion extremely slow/looping?

(OP)
Thank you!

The goal is to reduce the size of the database.  As long as I know the backup with garbage collection is working, I will schedule time to allow it to finish.

RE: Backup after large deletion extremely slow/looping?

But the size will only decrease if you restore afterwards. Garbage collection does not shrink your db - it merely "flags" removed records as "empty space" - ready to be reused by new records.

To shrink the file, you have to restore your db - but in order to restore, you don't need to garbage collect anyway (as you will be using a completely new file, with no garbage in it)

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.upscene.com

RE: Backup after large deletion extremely slow/looping?

(OP)
Sorry it wasn't clear, but I was always planning to do a restore after the backup.

You are saying I can do a backup with garbage collection off (it will run quicker) and a restore and this will shrink my database.

Wonderful!

Thank you for all your help.

RE: Backup after large deletion extremely slow/looping?

Yes, you can - garbage collection is only useful when you continue working with that particular db file. If you plan on destroying it anyway, turn off garbage collection when creating the backup.


Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.upscene.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close