Re: Use Postgres as a column store by creating one table per column

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Lev Kokotov <lev(dot)kokotov(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Use Postgres as a column store by creating one table per column
Date: 2019-05-24 19:38:15
Message-ID: 20190524193815.GE2480@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Greetings,

* Lev Kokotov (lev(dot)kokotov(at)gmail(dot)com) wrote:
> Is it efficient to use Postgres as a column store by creating one table per
> column?

Short answer is no, not in a traditional arrangement, anyway. The tuple
overhead would be extremely painful. It's possible to improve on that,
but it requires sacrificing what the tuple header gives you- visibility
information, along with some other things. The question will be if
that's acceptable or not.

> I'm thinking since Postgres stores tables in continuous blocks of 16MB each
> (I think that's the default page size?) I would get efficient reads and
> with parallel queries I could benefit from multiple cores.

The page size in PG is 8k, not 16MB.

Thanks,

Stephen

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2019-05-25 03:55:52 Re: Use Postgres as a column store by creating one table per column
Previous Message Tomas Vondra 2019-05-24 18:06:29 Re: Use Postgres as a column store by creating one table per column