The problem is that you want the data structure to be organized along two axes - your unique key and time. If you can exchange space for time, I would suggest different data structures (wrapped in your own class to ensure consistency) for each. You can use SortedList to track your keyword-targeted data. I believe this is based on the Red-Black Tree and should have the characteristics you want for keyword searches. Alternatively, if you do not need them ordered by key, you can use a simple dictionary.
To support date searching, you can have a B-tree (one implementation, note I have not tested: http://blog.daisley-harrison.com/blog/post/NET-Generic-BTree-Library-and-Source -Code.aspx ) by date. However, make sure it supports duplicate keys, as they may not be unique. It can contain either a copy of the data, or just a key associated with this timestamp.
All of these structures have log (n) or, better, search complexity. Enumerating items between two dates should be pretty efficient, with better performance coming with the B-Tree / Dictionary combination.
source share