pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Cottenceau <gc@mnc.ch>
To: Yannick Le Guédart <yannick@over-blog.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Seq scans on indexed columns.
Date: Mon, 14 Jan 2008 15:34:36 +0100
Message-ID: <87prw48ohv.fsf@messaging.mobileway.com> (raw)
In-Reply-To: <1200320331.14406.32.camel@yannick>
References: <1200320331.14406.32.camel@yannick>

Yannick Le Guédart <yannick 'at' over-blog.com> writes:

> 	Greetings,
>
> 	I was trying to get informations on #portgresql about a query plan I
> think is quite strange, and I was said to post on this list. I hope my
> mail will be clear enough. I have included the query, the query plan,
> and the table definitions. I just don't understand the "Seq Scan" on
> fileds that are indexed.

This is a FAQ entry (curious that the people there didn't direct
you to the FAQ first):

http://www.postgresql.org/docs/faqs.FAQ.html#item4.6

It's possible that more than 800,000 rows is not a "small
percentage of the rows in the table", and also there's the fact
that "indexes are normally not used (..) to perform joins".

Also, your database may not be analyzed, or not properly tuned
(for example, it seems that the default random_page_cost of 4 is
too large for current disks - at least for us, we've found that 2
is more correct)

[...]

> ->  Seq Scan on _user  (cost=0.00..205537.72 rows=806972 width=24)

-- 
Guillaume Cottenceau, MNC Mobile News Channel SA, an Alcatel-Lucent Company
Av. de la Gare 10, 1003 Lausanne, Switzerland - direct +41 21 317 50 36



view thread (3+ messages)  latest in thread

Message-ID: <87prw48ohv.fsf@messaging.mobileway.com>
Permalink:  ../87prw48ohv.fsf@messaging.mobileway.com/
Also on:    postgresql.org/message-id/87prw48ohv.fsf@messaging.mobileway.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: gc@mnc.ch, yannick@over-blog.com
  Subject: Re: Seq scans on indexed columns.
  In-Reply-To: <87prw48ohv.fsf@messaging.mobileway.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