pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Swan <tswan@idigx.com>
To: Igor Artimenko <iartimenko@bluecatnetworks.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: I could not get postgres to utilizy indexes
Date: Wed, 18 Aug 2004 12:12:26 -0500
Message-ID: <41238DFA.1030207@idigx.com> (raw)
In-Reply-To: <5DEC3FFCDE2F7C4DA45433EE09A4F22C01A3FFCA@colossus.dyadem.corp>
References: <5DEC3FFCDE2F7C4DA45433EE09A4F22C01A3FFCA@colossus.dyadem.corp>

Igor Artimenko wrote:

>Hi verybody!
>
>I can't make use of indexes even I tried the same test by changing different settings in postgres.conf like geqo to off/on & geqo related parameters, enable_seqscan off/on & so on. Result is the same. 
>
>Here is test itself:
>
>I've created simplest table test and executed the same statement "explain analyze select id from test where id = 50000;" Few times I added 100,000 records, applied vacuum full; and issued above explain command. 
>Postgres uses sequential scan instead of index one. 
>Of cause Time to execute the same statement constantly grows. In my mind index should not allow time to grow so much.  
>
>Why Postgres does not utilizes primary unique index?
>What I'm missing? It continue growing even there are 1,200,000 records. It should at least start using index at some point.
>
>  
>
Igor, you may want to run "vacuum analyze" and see if your results change.

Thomas




view thread (7+ messages)  latest in thread

Message-ID: <41238DFA.1030207@idigx.com>
Permalink:  ../41238DFA.1030207@idigx.com/
Also on:    postgresql.org/message-id/41238DFA.1030207@idigx.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tswan@idigx.com, iartimenko@bluecatnetworks.com
  Subject: Re: I could not get postgres to utilizy indexes
  In-Reply-To: <41238DFA.1030207@idigx.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox