X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DA7C8475EE2 for ; Sun, 20 Apr 2003 02:06:45 -0400 (EDT) Received: from hacklab.net (h-68-164-245-144.SNVACAID.covad.net [68.164.245.144]) by postgresql.org (Postfix) with SMTP id E8D244758C9 for ; Sun, 20 Apr 2003 02:06:43 -0400 (EDT) Received: (qmail 15440 invoked by uid 421); 20 Apr 2003 06:01:37 -0000 Received: from pvspam-postgres@hacklab.net by penguin.hacklab.net by uid 417 with qmail-scanner-1.16 ( Clear:SA:0(-32.8/5.0):. Processed in 0.23358 secs); 20 Apr 2003 06:01:37 -0000 Received: from localhost (antispam@127.0.0.1) by localhost with SMTP; 20 Apr 2003 06:01:37 -0000 Subject: Re: Sequence scans on indexed row From: Tim Ellis To: kp Cc: pgsql-admin@postgresql.org In-Reply-To: <3EA231D2.2040305@pobox.gr> References: <3EA231D2.2040305@pobox.gr> Content-Type: text/plain Organization: PostgreSQL Admin Message-Id: <1050818790.8042.98.camel@timetop> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2-1mdk Date: 19 Apr 2003 23:06:31 -0700 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-38.0 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/281 X-Sequence-Number: 8436 On Sat, 2003-04-19 at 22:36, kp wrote: > The other difference between these two columns (or rather the kind of > data they contain) is that the column for which postgres *uses* the > index on contains around 32000 distinct values while the other only > contains 14 distinct values. Did you do a vacuum analyze on the tables in question? There are some other more complex possibilities, but best to start w/ the basics. -- Tim Ellis Senior Database Architect and author, tedia2sql (http://tedia2sql.tigris.org) If this helped you, http://svcs.affero.net/rm.php?r=philovivero