Search Postgresql Archives

Re: indexes are farked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-08-02 at 13:05, Dr NoName wrote:
> siam_production=> explain analyze select * 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)


Notice the disparity here?  The query planner thinks that there's gonna
be 27833 rows returned, but there's only really 5261 being returned.

When's the last time you analyzed this table?  And have you considered
running the pg_autovacuum daemon, which will vacuum and analyze for you
in the back ground?

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux