I have encountered a situation where the news and the news archive are in different tables.
Given that those tables contain many records and both share exactly the same structure is it still smart to split them up instead of having a flag that marks them as archived?
views:
41answers:
2Your news table will be faster without the archive. You have to ask yourself if both are often hit in the same query. If they aren't then it may make sense to keep them separate.
Also have to ask yourself what archive actually means? 1 year old, 2 years old. I'm guessing it's just a flag to either show on the News Page or News Archive page. If you do merge into one table perhaps you could just use logic > 1 year old is archive.
You could also create a View that unions both tables together.
You could also consider partitioning the data on whether the article is marked for archive or not. That way at least you could change the structure without remembering to fix the other table and you still get the faster performance out of the partition that contains only the active records. However, if the system is in place and working, it might be best just to live with it. I wouldn't pay you to make this change if I were your customer unless there was a problem happening with the current structure.