Making Bulk Changes to a Shared Database

I want to delete 25000 records from a shared database (part of a plan to archive the oldest records to keep the database from becoming unwieldy with old, unneeded records). Deleting them one at a a time with a procedure is going to be very, very slow; I think it would take several hours. The alternative, I think, is to start a new Generation with Field Arrangement selected, make the changes, then upload the DB. That will work, but defeats one of my goals, to make myself obsolete in managing the database.
My question is is there a way to remove large number of records in a reasonably speedy fashion programmatically. I have not found such a thing. The closest statement is dropserver, but that just disconnects the local copy and does not allow changes to then be uploaded with connecttoserver.
Adding a statement that would allow the DB to be put into pause mode and another statement to then upload it programmatically after other changes are made, might be worth considering some day.

I think that is the way to do it.

Panorama Server normally keeps a list of deleted records. Whenever a client database is synchronized, it checks this list and removes any records on the list. This relies on the idea that deleting records is relatively infrequent. If you delete 25,000 records, that huge list will have to be maintained and dealt with every time the database is synchronized. There’s no way to prune the list, because some client may have the old data sitting in an unopened database, waiting to be deleted the next time the database is opened and synchronized.

When a new Generation is performed, however, the list of deleted records is cleared. This is ok in this situation because we know that the next time any client attempts to open the database, the entire database will be downloaded to the client. So we no longer have to worry about synchronizing with older copies of the database.

I think what you want is a way to do a new generation in your code. Right now this is built into the Database Options dialog, and can’t be performed automatically. I think it would be a substantial project, but obviously all the pieces are available to me.

Thanks. That is useful information. What I suggested is obviously a low priority.
BTW, 188 hours, 58 minutes, 50 seconds.

What is that – how long your server has been running?

That was time remaining until January 20, 2021, at 12:00 noon.

1 Like