Given a data stream of continuously arriving items containing a timestamp and text (e.g. a search engine's query log), how would you store the data so that you could efficiently retrieve totals over time to plot trend lines per term?
A row-oriented database with tuples like (term, date, count) would work but would not scale with a large number of different terms. What alternative data structures should be considered in this context (e.g. column-oriented store)? Fast inserts are an important requirement.