Search Postgresql Archives

Re: NOT DEFERRABLE vs. DEFERRABLE INITIALLY IMMEDIATE constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Janes <jeff.janes@xxxxxxxxx> writes:
> I've been plagued several times by NOT DEFERRABLE constraints.  Is there
> any good reason to define a constraint as NOT DEFERRABLE rather
> than DEFERRABLE INITIALLY IMMEDIATE?  For example, is there performance
> penalty for PostgreSQL being prepared to defer a constraint even though it
> is not currently being deferred?

There's a substantial performance difference between deferrable and
nondeferrable uniqueness constraints (ie, indexes).  For foreign keys
I don't believe it matters.  We don't implement deferrability for
other types of constraints such as CHECK.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux