5

I have a few dozen tables, that have data in them, both for the core set of data, and then the company specific data.

I can never delete the core set of data, that is global for all companies.

But i want to be able to help identify orphan data.

Data that is inactive, but hasn't been deleted.

I do not need a query, I can figure that out myself.

Just some ideas on best practices, to help identify then get rid of orphan data, which hopefully will trim the database size down.

Thanks

  • 2
    hmm... if you already "know" wich data is irrelevant just backup and start deleting, can't think of anything else. If someone has a better way, please, speak up, I would love to know. – eiefai Mar 9 '11 at 21:10
3

I would suggest duplicating the table structure in a different schema (backup) and move the data from the one table to the other. That way it can be managed effectively. But if you know what's orphaned, then why would you keep it? What purpose will it serve?

0

You can DELETE FROM table; safely if you foreign keys prevent deletion of still referenced rows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.