X-Original-To: pgsql-performance@postgresql.org Received: from sabre.velocet.net (sabre.velocet.net [216.138.209.205]) by postgresql.org (Postfix) with ESMTP id D82E54761C0 for ; Wed, 5 Mar 2003 10:02:19 -0500 (EST) Received: from stark.dyndns.tv (H162.C233.tor.velocet.net [216.138.233.162]) by sabre.velocet.net (Postfix) with ESMTP id 55AEA13808F; Wed, 5 Mar 2003 10:02:20 -0500 (EST) Received: from localhost ([127.0.0.1] helo=stark.dyndns.tv ident=foobar) by stark.dyndns.tv with smtp (Exim 3.36 #1 (Debian)) id 18qaPS-000245-00; Wed, 05 Mar 2003 10:02:18 -0500 To: Richard Huxton Cc: Greg Stark , Subject: Re: Planner matching constants across tables in a join References: <200303051113.14320.dev@archonet.com> <87bs0q9e8l.fsf@stark.dyndns.tv> <200303051424.12351.dev@archonet.com> In-Reply-To: <200303051424.12351.dev@archonet.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 05 Mar 2003 10:02:17 -0500 Message-ID: <87llzt97ra.fsf@stark.dyndns.tv> Lines: 17 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200303/28 X-Sequence-Number: 1326 Richard Huxton writes: > Filter: ((line_id)::text = '0912345 0004'::text) So I think this means that line_id is being casted to "text". Though I'm not clear why it would be choosing "text" for the constant if line_id wasn't text to begin with. In any case my plans here look like: > Filter: (aa = 'x'::text) so it looks like there's something extra going on in your plan. what does your table definition look like? -- greg