pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris Hoover <revoohc@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: constraint_exclusion on OLTP tables
Date: Mon, 13 Feb 2006 10:02:05 -0500
Message-ID: <28632.1139842925@sss.pgh.pa.us> (raw)
In-Reply-To: <1d219a6f0602130650l690a255amf4bb68ceab914e3b@mail.gmail.com>
References: <1d219a6f0602130650l690a255amf4bb68ceab914e3b@mail.gmail.com>

Chris Hoover <revoohc@gmail.com> writes:
> The problem I am having is how can you safely move records between
> main_table_live and one of the other partition tables?

My advice is "don't do that".  Partition just based on the year.
You can exploit your knowledge about status distribution by creating
suitable indexes.

> Also, is there a way to make foreign keys work with the partitioned table

No, not at present, which is another reason you don't want records
moving around.

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <28632.1139842925@sss.pgh.pa.us>
Permalink:  ../28632.1139842925@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28632.1139842925@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, revoohc@gmail.com
  Subject: Re: constraint_exclusion on OLTP tables
  In-Reply-To: <28632.1139842925@sss.pgh.pa.us>
  References: <1d219a6f0602130650l690a255amf4bb68ceab914e3b@mail.gmail.com> <28632.1139842925@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox