Partitioning by status?

From: Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Partitioning by status?
Date: 2012-01-10 16:57:04
Message-ID: CANPAkgt9mGoF7SyA_n7jX3t6siLGPyA=d1tR2bPwKiAex3bDMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

We have a set of large tables. One of the columns is a status indicator
(active / archived). The queries against these tables almost always
include the status, so partitioning against that seems to makes sense from
a logical standpoint, especially given most of the data is "archived" and
most of the processes want active records.

Is it practical to partition on the status column and, eg, use triggers to
move a row between the two partitions when status is updated? Any
surprises to watch for, given the status column is actually NULL for active
data and contains a value when archived?

Mike

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2012-01-10 17:04:34 Re: Query planner doesn't use index scan on tsvector GIN index if LIMIT is specifiedQuery planner doesn't use index scan on tsvector GIN index if LIMIT is specified
Previous Message darklow 2012-01-10 12:30:41 Query planner doesn't use index scan on tsvector GIN index if LIMIT is specifiedQuery planner doesn't use index scan on tsvector GIN index if LIMIT is specified