While not natively suppported Postgres 9.5 extensions exist for HyperLogLog, and Columnar storage. Here I benchmark how they compare on some simple cases for a billion integers in 250 million rows.