, , , .. (, .)
, DateTime Applied, , :
SELECT TOP 1 Value WHERE Key = %A AND Applied <= GETDATE() ORDER BY Applied DESC
The advantages of this solution are that if you know some changes that will be applied in a certain period of time (for example, several months), you can simply add the corresponding database records and the changes will be applied when it is correct. The disadvantages are that it is difficult to save anything else besides the values, and you need to create the appropriate caching so that it does not fall into your database for every access, but will update it when a new value is applied.
source
share