Re: constraints and performance

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Jodi Kanter <jkanter(at)virginia(dot)edu>
Cc: Postgres Admin List <pgsql-admin(at)postgresql(dot)org>
Subject: Re: constraints and performance
Date: 2004-02-11 16:01:31
Message-ID: Pine.LNX.4.33.0402110859280.32376-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 11 Feb 2004, Jodi Kanter wrote:

> Do constraints effect performance significantly?

That depends.

Foreign key constraints on int4 columns or int8 columns (matching of
course) are usually quite fast.

FK constraints on non-int (numeric, text, etc...) tend to be slower.

check constraints can be a killer if they are complex or use functions,
but simple check constraints are usually alright.

Do you have a specific use case you're looking at?

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-02-11 16:21:14 Re: IDE and write cache
Previous Message AlmawElias Fantahun 2004-02-11 16:00:01 remove me from the list