Re: [PERFORM] Are there known performance issues with defining all Foreign Keys as deferrable initially immediate

2012-09-16 Thread Craig Ringer
On 09/16/2012 11:37 PM, Tom Lane wrote: Craig Ringer writes: Found it, it's in the NOTES for CREATE TABLE. http://www.postgresql.org/docs/current/static/sql-createtable.html: When a UNIQUE or PRIMARY KEY constraint is not deferrable, PostgreSQL checks for uniqueness immediately whenever a ro

Re: [PERFORM] Are there known performance issues with defining all Foreign Keys as deferrable initially immediate

2012-09-16 Thread Tom Lane
Craig Ringer writes: > Found it, it's in the NOTES for CREATE TABLE. > http://www.postgresql.org/docs/current/static/sql-createtable.html: > When a UNIQUE or PRIMARY KEY constraint is not deferrable, PostgreSQL > checks for uniqueness immediately whenever a row is inserted or > modified. The SQ

Re: [PERFORM] Are there known performance issues with defining all Foreign Keys as deferrable initially immediate

2012-09-16 Thread Craig Ringer
On 09/16/2012 09:45 PM, Craig Ringer wrote: This seems under-documented and I haven't found much good info on it, so the best thing to do is test it. Found it, it's in the NOTES for CREATE TABLE. http://www.postgresql.org/docs/current/static/sql-createtable.html: When a UNIQUE or PRIMARY KEY

Re: [PERFORM] Are there known performance issues with defining all Foreign Keys as deferrable initially immediate

2012-09-16 Thread Craig Ringer
On 09/14/2012 11:56 PM, McKinzie, Alan (Alan) wrote: My underlying question/concern is "will this change have any adverse affects (on performance) during normal operations when the foreign keys are set to deferrable initially immediate" .vs. the foreign keys being defined as NOT DEFERRABLE. AF