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



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to