X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 52BE3D1D8AE for ; Wed, 11 Feb 2004 16:08:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 78072-03 for ; Wed, 11 Feb 2004 12:07:48 -0400 (AST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 8844FD1CCBE for ; Wed, 11 Feb 2004 12:07:49 -0400 (AST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id i1BG6Qc5000585; Wed, 11 Feb 2004 09:06:26 -0700 (MST) Date: Wed, 11 Feb 2004 09:01:31 -0700 (MST) From: "scott.marlowe" To: Jodi Kanter Cc: Postgres Admin List Subject: Re: constraints and performance In-Reply-To: <402A2C3D.7010009@virginia.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/161 X-Sequence-Number: 12335 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?