X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 748D35362C for ; Fri, 25 Mar 2005 06:58:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 70082-06 for ; Fri, 25 Mar 2005 06:58:27 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3C92153629 for ; Fri, 25 Mar 2005 06:58:26 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2P6wKjA020846; Fri, 25 Mar 2005 01:58:20 -0500 (EST) To: Christopher Kings-Lynne Cc: Karim Nassar , pgsql-performance@postgresql.org Subject: Re: Delete query takes exorbitant amount of time In-reply-to: <4243879B.10200@familyhealth.com.au> References: <1111709457.9085.127.camel@k2.cet.nau.edu> <2630.1111711927@sss.pgh.pa.us> <1111715131.9085.174.camel@k2.cet.nau.edu> <3750.1111715318@sss.pgh.pa.us> <4243879B.10200@familyhealth.com.au> Comments: In-reply-to Christopher Kings-Lynne message dated "Fri, 25 Mar 2005 11:38:03 +0800" Date: Fri, 25 Mar 2005 01:58:20 -0500 Message-ID: <20845.1111733900@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/539 X-Sequence-Number: 11244 Christopher Kings-Lynne writes: >> In that case there's a datatype mismatch between the referencing and >> referenced columns, which prevents the index from being used for the >> FK check. > Is creating such a foreign key a WARNING yet? I believe so as of 8.0. It's a bit tricky since 8.0 does allow some cross-type cases to be indexed, but IIRC we have a test that understands about that... regards, tom lane