Received: from gromit.dotclick.com (ipn9-f8366.net-resource.net [216.204.83.66]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9NEbZP61350; Tue, 23 Oct 2001 10:37:35 -0400 (EDT) (envelope-from markw@mohawksoft.com) Received: from mohawksoft.com (IDENT:markw@localhost.localdomain [127.0.0.1]) by gromit.dotclick.com (8.9.3/8.9.3) with ESMTP id KAA00927; Tue, 23 Oct 2001 10:40:00 -0400 Message-ID: <3BD58140.F7DF625C@mohawksoft.com> Date: Tue, 23 Oct 2001 10:40:00 -0400 From: mlw X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.4.2 i686) X-Accept-Language: en MIME-Version: 1.0 To: Doug McNaught CC: Reiner Dassing , pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: Index of a table is not used (in any case) References: <3BD3BFE0.55FC3EC0@wettzell.ifag.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200110/329 X-Sequence-Number: 5282 Doug McNaught wrote: > Reiner Dassing writes: > > > Hello PostgreSQl Users! > > > > PostSQL V 7.1.1: > > > > I have defined a table and the necessary indices. > > But the index is not used in every SELECT. (Therefore, the selects are > > *very* slow, due to seq scan on > > 20 million entries, which is a test setup up to now) > > Perennial first question: did you VACUUM ANALYZE? Can there, or could there, be a notion of "rule based" optimization of queries in PostgreSQL? The "not using index" problem is probably the most common and most misunderstood problem.