I save 2 billion rows of timeseries data every year. I use a regular btree index for &quot;hot data&quot; that is less than 6 months old and BRIN index for older data. You can do this by writing a functional index.<p>You also have to spend some time to tune the query cost settings to avoid sequential scans if you&#x27;re only gonna work with a subset of the data. Another optimization could be implementing table inheritance so you have a table for every year. If you work with data sets for a specific year you would get a big performance boost with sequential scans.<p>PostgreSQL&#x27;s biggest weakness at the moment is aggregating data by using several cpu workers&#x2F;cores. This is coming in PostgreSQL 9.6<p>Oh and I run PostgreSQL on ZFS with LZ4 compression,