What is the best way to store historical data in SQL Server 2005/2008?

后端 未结 8 941
刺人心
刺人心 2021-02-12 10:55

My simplified and contrived example is the following:-

Lets say that I want to measure and store the temperature (and other values) of all the worlds\' towns on a daily

8条回答
  •  囚心锁ツ
    2021-02-12 11:25

    I suggest keep in the same table since historical data is queried just as often. Unless you will be adding many more columns to the table.

    When size becomes an issue, you can partition it out by decade and have a stored procedure union the requested rows.

提交回复
热议问题