pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shridhar Daithankar <shridhar_daithankar@myrealbox.com>
To: Andrei Bintintan <klodoma@ar-sd.net>
Cc: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: [ADMIN] Index not used. WHY?
Date: Fri, 05 Dec 2003 14:09:51 +0530
Message-ID: <3FD04457.6000504@myrealbox.com> (raw)
In-Reply-To: <00c901c3bb07$592bbe30$0b00a8c0@andy>
References: <014901c3ba76$ffd65650$0b00a8c0@andy>
	<20031204071432.R66123@megazone.bigpanda.com>
	<00c901c3bb07$592bbe30$0b00a8c0@andy>

Andrei Bintintan wrote:

> There are around 700 rows in this table.
> If I set enable_seqscan=off then the index is used and I also used Vacuum
> Analyze recently.

For 700 rows I think seq. would work best.
> 
> I find it strange because the number of values of id_user and id_modull are
> somehow in the same distribution and when I search the table the id_user
> index is used but the id_modull index is not used.
> 
> Does somehow postgre know that a seq scan runs faster in this case as a
> index scan? Should I erase this index?
> I have to say that the data's in this table are not changed offen, but there
> are a LOT of joins made with this table.

If table is cached then it does not matter. Unless it grows substantially, say 
to around hundred thousand rows(Note your table is small), idex wouldn't be that 
useful.

  Shridhar




view thread (5+ messages)  latest in thread

Message-ID: <3FD04457.6000504@myrealbox.com>
Permalink:  ../3FD04457.6000504@myrealbox.com/
Also on:    postgresql.org/message-id/3FD04457.6000504@myrealbox.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: shridhar_daithankar@myrealbox.com, klodoma@ar-sd.net, sszabo@megazone.bigpanda.com
  Subject: Re: [ADMIN] Index not used. WHY?
  In-Reply-To: <3FD04457.6000504@myrealbox.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