开发者

How do you do to keep useless datas with good performance?

Environment : SQL Server 2005, Windows Server 2003

The system in question is an online booking system. In it, you can create special offers.

A special offer has some period of validity.

We keep in our database every period entered by our client even if the period is in the past. We have to keep these periods.

The system exists since 10 years so most of the pe开发者_如何学运维riods in the database are past.

The problem :

  • to select the periods for a special offer is very long
  • I select special offers with no valid period associated, so I have to select my offers , then my periods, and after that I remove the offers that doesn't have any valid period.

How do you manage that kind of case ? Is there any built-in tool to ignore a part of the data in some case ?


You probably can speed up things by adding the right indexes, but if that doesn't help (enough) you can think about creating a second table to archive the past offers in. That way, you won't be bothered by the old data, but if you need it (for reports or other reasons) you can still refer to the archive.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜