Re: indexes are fucked - Mailing list pgsql-general

From Ragnar Hafstað
Subject Re: indexes are fucked
Date
Msg-id 1123004265.19874.23.camel@localhost.localdomain
Whole thread Raw
In response to indexes are fucked  (Dr NoName <spamacct11@yahoo.com>)
Responses Re: indexes are fucked
List pgsql-general
On Tue, 2005-08-02 at 10:04 -0700, Dr NoName wrote:

> I got another problem with postgres. This time it
> refuses to use the indexes. Check this out:

[snip]

> siam_production=> explain SELECT render.* FROM render
> WHERE person_id = 432;
>                            QUERY PLAN
> -----------------------------------------------------------------
>  Seq Scan on render  (cost=0.00..39014.72 rows=27833
> width=1493)
>    Filter: (person_id = 432)

An explain analyze would be more informative, with and without
seqscan enabled.
What proportion of rows have this particular value of person_id?
Maybe you need to increase statistics target of the column.

What is the output of these:

set enable_seqscan = off;
explain SELECT render.* FROM render WHERE person_id = 432;

set enable_seqscan = on;
explain SELECT render.* FROM render WHERE person_id = 432;

select count(*) from render;

select count(*) from render WHERE person_id = 432;

gnari



pgsql-general by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: [BUGS] BUG #1552 followup
Next
From: Scott Marlowe
Date:
Subject: Re: indexes are farked