pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott.marlowe <scott.marlowe@ihs.com>
To: Jodi Kanter <jkanter@virginia.edu>
Cc: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: Re: constraints and performance
Date: Wed, 11 Feb 2004 09:01:31 -0700 (MST)
Message-ID: <Pine.LNX.4.33.0402110859280.32376-100000@css120.ihs.com> (raw)
In-Reply-To: <402A2C3D.7010009@virginia.edu>

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?




view thread (4+ messages)  latest in thread

Message-ID: <Pine.LNX.4.33.0402110859280.32376-100000@css120.ihs.com>
Permalink:  ../Pine.LNX.4.33.0402110859280.32376-100000@css120.ihs.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.33.0402110859280.32376-100000@css120.ihs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: scott.marlowe@ihs.com, jkanter@virginia.edu
  Subject: Re: constraints and performance
  In-Reply-To: <Pine.LNX.4.33.0402110859280.32376-100000@css120.ihs.com>
  References: <402A2C3D.7010009@virginia.edu> <Pine.LNX.4.33.0402110859280.32376-100000@css120.ihs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox