Re: Table partitioning problem - Mailing list pgsql-performance

From Jim Nasby
Subject Re: Table partitioning problem
Date
Msg-id 04931568-A1CA-4B5D-B907-E061713E1B54@nasby.net
Whole thread Raw
In response to Table partitioning problem  (Samba GUEYE <samba.gueye@intesens.com>)
Responses Re: Table partitioning problem
List 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
constraintviolation 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
limitationdue to postgrsql table inheritance select queries performance are really bad without partitionning and i'm
lookingfor 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'tdo 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@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net



pgsql-performance by date:

Previous
From: Robert Haas
Date:
Subject: Re: Query performance with disabled hashjoin and mergejoin
Next
From: Conor Walsh
Date:
Subject: Re: Slow join on partitioned table