title: LIFO / sorted database design pattern
body: <p>I want to store data (as an archive) in two seperate lists one is to be a sort of LIFO stack where new data just gets pushed on top and the other is sorted by a temporally independent value. Data may be retreived at a later point in time, but I'm generally only interested in the topmost N values. Both lists can get very long but contain very simple values (document ids with priority). Is there a database to implement this pattern efficiently? I hear HBase does sorted storage, would it be useful for this kind of application?</p>
  
  <p>At least the LIFO storage could be implemented as a plain file. Is this wise?
  Or is this concern about retreival speed premature optimization, i.e. are there commands in SQL with which i can retreive first N by time of insertion / sorted by a value . Or should I shard / paginate?</p>