X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 937ED9FB233 for ; Thu, 17 Aug 2006 21:31:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 58039-06 for ; Fri, 18 Aug 2006 00:31:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 551689FA6B2 for ; Thu, 17 Aug 2006 21:31:53 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k7I0VqVU000966; Thu, 17 Aug 2006 20:31:52 -0400 (EDT) To: "Peter Hardman" cc: pgsql-performance@postgresql.org Subject: Re: PostgreSQL runs a query much slower than BDE and MySQL In-reply-to: <44E4DBE7.22131.10181D0@peter.ssbg.zetnet.co.uk> References: <5321.1155820310@sss.pgh.pa.us> <44E4DBE7.22131.10181D0@peter.ssbg.zetnet.co.uk> Comments: In-reply-to "Peter Hardman" message dated "Thu, 17 Aug 2006 21:13:11 +0100" Date: Thu, 17 Aug 2006 20:31:51 -0400 Message-ID: <965.1155861111@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/291 X-Sequence-Number: 20476 "Peter Hardman" writes: > On 17 Aug 2006 at 14:33, Tom Lane wrote: >> I found a couple of minor planner problems, which I've repaired in CVS >> HEAD. You might consider using TEXT columns instead of VARCHAR(n), > As someone else suggested, these fields ought really to be CHAR no VARCHAR. That should be fine too. VARCHAR is sort of a poor stepchild in Postgres, because it piggybacks on TEXT's operators --- but CHAR has different comparison rules, hence its own operators, hence doesn't trip over that bug. There's still some things that don't add up to me, like the question of the pkey column order. Will look some more. regards, tom lane