Fast data, slow data

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Fast data, slow data
Date: 2014-06-26 09:29:47
Message-ID: CAGuHJrM7GVzEt4t_WZq1_Pc3f_T=zjPx64+q8AZ6ThfTwVf7nA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a use case in which the most recent data experiences a lot of
transactions (inserts and updates) and then the churn kind of calms down.
Eventually the data is relatively static and will only be updated in
special and sporatic events.

I was thinking about keeping the high churn data in a different table so
that the vacuums on that table can go faster and the vacuums on the rest of
the data will rarely be needed.

Ideally the high churn data would be in an in memory table but failing that
I thought that an unlogged table would be good enough. So now I need a way
to flush the oldest data in this table to another logged table and do it in
an efficient manner. I don't think partitioning is a good idea in this case
because the partitions will be for small time periods (5 to 15 minutes).

Anybody have a similar problem? If so how did you solve it?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Le Cuirot 2014-06-26 09:30:15 Re: Alternative to psql -c ?
Previous Message James Le Cuirot 2014-06-26 09:22:04 Re: Alternative to psql -c ?