Partitioning on Table with Foreign Key

From: Yan Cheng Cheok <yccheok(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Partitioning on Table with Foreign Key
Date: 2010-01-21 08:46:21
Message-ID: 406758.87941.qm@web65713.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am referring to http://www.postgresql.org/docs/current/static/ddl-partitioning.html

I have the follow table :

table lot
=========
id | date |
1 2010-01-19 13:53:57.713
2 2010-01-20 11:34:11.856

table measurement
=========
id | fk_lot_id |
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2

table measurement will have a *lot* of row (millions). I want to speed up write and read access. Hence, I use partition technique.

CREATE TABLE measurement_y2006m02 (
CHECK ( date >= DATE '2006-02-01' AND date < DATE '2006-03-01' )
) INHERITS (measurement);

Opps! But measurement do not have date column. How I can refer to measurement's lot's date?

Thanks and Regards
Yan Cheng CHEOK

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2010-01-21 09:15:05 Re: About partitioning
Previous Message Bjørn T Johansen 2010-01-21 07:06:48 64bits or 32 bits on ESX?