Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Imagine the layout on disk for both a row based and a column based database...or see this link:

http://www.timestored.com/time-series-data/what-is-a-column-...

Now imagine which areas need read when you perform a query like "average price" for all dates. In row-oriented databases we have to read over large areas, in column-oriented databases the prices are stored as one sequential region and we can read just that region. Column-oriented databases are therefore extremely quick at aggregate queries (sum, average, min, max, etc.).

Why are most databases row-oriented? I hear you ask. Imagine we want to add one row somewhere in the middle of our data for 2011-02-26, on the row oriented database no problem, column oriented we will have to move almost all the data! Lucky since we mostly deal with time series new data only appends to the end of our table.



I see.

So if my data consists of time series I use column stores?

Is this the only use case? The page talks about games.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: