Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eAHK98s65684 for ; Fri, 17 Nov 2000 15:09:08 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id eAHK6DO13937; Fri, 17 Nov 2000 15:06:13 -0500 (EST) To: "Ingram, Bryan" cc: "'pgsql-sql@postgresql.org'" Subject: Re: Why is this doing a seq scan? In-reply-to: <01CCE949D2717845BA2E573DC081167E052FAE@BKMAIL.sfsinternal.com> References: <01CCE949D2717845BA2E573DC081167E052FAE@BKMAIL.sfsinternal.com> Comments: In-reply-to "Ingram, Bryan" message dated "Fri, 17 Nov 2000 12:49:49 -0600" Date: Fri, 17 Nov 2000 15:06:13 -0500 Message-ID: <13934.974491573@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200011/142 X-Sequence-Number: 173 Hmm. Have you VACUUM ANALYZED the tables? If so, what do you get from these queries: select attname,attdisbursion,s.* from pg_statistic s, pg_attribute a, pg_class c where starelid = c.oid and attrelid = c.oid and staattnum = attnum and relname = 'zips'; select attname,attdisbursion,s.* from pg_statistic s, pg_attribute a, pg_class c where starelid = c.oid and attrelid = c.oid and staattnum = attnum and relname = 'atms'; Also it would be useful to see the full declarations of the tables and their indexes; I'm wondering what datatype the zip columns are, for example. regards, tom lane