Re: Table partitioning problem

From: Jim Nasby <jim(at)nasby(dot)net>
To: Samba GUEYE <samba(dot)gueye(at)intesens(dot)com>
Cc: Postgre Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Table partitioning problem
Date: 2011-03-09 22:01:58
Message-ID: 04931568-A1CA-4B5D-B907-E061713E1B54@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mar 8, 2011, at 9:45 AM, Samba GUEYE wrote:
> I have a problem with table partitioning because i have a foreign key applied on the partionned table and it throw a constraint violation error during inserts.
> I saw on the manual (http://www.postgresql.org/docs/8.4/interactive/ddl-inherit.html caveats section) that it's a limitation due to postgrsql table inheritance select queries performance are really bad without partitionning and i'm looking for a workaround to this foreign key problem or another solution for improve performance for larges tables.

Actually, this sounds more like having a foreign key pointed at a parent table in an inheritance tree; which flat-out doesn't do what you'd want.

Can you tell us what the foreign key constraint actually is, and what the inheritance setup for the tables in the FK is?
--
Jim C. Nasby, Database Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Conor Walsh 2011-03-09 22:42:28 Re: Slow join on partitioned table
Previous Message Robert Haas 2011-03-09 16:48:41 Re: Query performance with disabled hashjoin and mergejoin