> What is the output of these:
>
> set enable_seqscan = off;
> explain SELECT render.* FROM render WHERE person_id
> = 432;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using render_person_id_idx on render
(cost=0.00..108735.88 rows=27833 width=1493) (actual
time=0.11..77.62 rows=5261 loops=1)
Index Cond: (person_id = 432)
Total runtime: 80.99 msec
(3 rows)
so it will use the index if I disable seq scan? wtf?
> set enable_seqscan = on;
> explain SELECT render.* FROM render WHERE person_id
> = 432;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------
Seq Scan on render (cost=0.00..39014.72 rows=27833
width=1493) (actual time=7.11..743.55 rows=5261
loops=1)
Filter: (person_id = 432)
Total runtime: 747.42 msec
(3 rows)
> select count(*) from render;
count
--------
236612
(1 row)
> select count(*) from render WHERE person_id = 432;
count
-------
5261
(1 row)
thanks,
Eugene
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com