DeiForm
DeiForm

Reputation: 664

Archive some data of database

I have made an auction site and I would like to have there all old auctions archived. The question is: Should I move old records which are out-of-date to another table "archive" and make archive from that table or should I keep them in table where I keep also up-to-date products which are currently on auction. Thanks in advance

Upvotes: 1

Views: 84

Answers (2)

E.J. Brennan
E.J. Brennan

Reputation: 46879

Personally, I would keep them in the same table up-to-the point where the table growth is causing you problems.

Its going to be easier to work with just one table, and if the performance is not affected, why bother? Maybe your site/db will never even grow large enough to deal with the problem.

If performance does become a problem, an archive table is a reasonable solution. Its reasonable to be planning for what you will eventually need to do, but perhaps premature at this point to do it.

Upvotes: 1

The_Monster
The_Monster

Reputation: 510

This is what i would do: When a auction item is older then 1 month then i would trasfer it to another table archive.

You can also keep everything in one table and filter on date/time. When the date is older then a month from the current time you filter then.

I would go for option 1 bt there are multiple ways of doeing it.

Upvotes: 1

Related Questions