X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6546CD1B53E for ; Tue, 7 Oct 2003 00:38:20 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 89093-05 for ; Mon, 6 Oct 2003 21:37:33 -0300 (ADT) Received: from web21401.mail.yahoo.com (web21401.mail.yahoo.com [216.136.232.71]) by svr1.postgresql.org (Postfix) with SMTP id 0819FD1B4E5 for ; Mon, 6 Oct 2003 21:37:30 -0300 (ADT) Message-ID: <20031007003733.26679.qmail@web21401.mail.yahoo.com> Received: from [64.81.205.234] by web21401.mail.yahoo.com via HTTP; Mon, 06 Oct 2003 17:37:33 PDT Date: Mon, 6 Oct 2003 17:37:33 -0700 (PDT) From: ow Subject: Re: FK Constraints, indexes and performance To: Tom Lane Cc: pgsql-sql@postgresql.org In-Reply-To: <19626.1065415203@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/76 X-Sequence-Number: 15476 --- Tom Lane wrote: > It looks to me like the 7.3 planner will not choose indexscans for the FK > check queries in this example, because the comparison operators are > misconstrued as shown in this thread: > http://archives.postgresql.org/pgsql-hackers/2003-03/msg00997.php > The equality operator on your domain is taken to be "oideq" which won't > be the same operator associated with the index on the column. > > This seems to be fixed in 7.4. In 7.3 I'd counsel not introducing > domains unnecessarily. > > regards, tom lane It looks like it worked. I moved to 7.4.b4 and, in my case, performance improvement on insert is drastic (about 30x). Thanks __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com