Re: Seq scans on indexed columns. - Mailing list pgsql-performance

From Guillaume Cottenceau
Subject Re: Seq scans on indexed columns.
Date
Msg-id 87prw48ohv.fsf@messaging.mobileway.com
Whole thread Raw
In response to Seq scans on indexed columns.  (Yannick Le Guédart <yannick@over-blog.com>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Yannick Le Guédart
Date:
Subject: Seq scans on indexed columns.
Next
From: Tom Lane
Date:
Subject: Re: Linux/PostgreSQL scalability issue - problem with 8 cores