Re: indexes are farked - Mailing list pgsql-general

From Scott Marlowe
Subject Re: indexes are farked
Date
Msg-id 1123006237.21793.25.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: indexes are farked  (Dr NoName <spamacct11@yahoo.com>)
Responses Re: indexes are farked  (Dr NoName <spamacct11@yahoo.com>)
List pgsql-general
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?

pgsql-general by date:

Previous
From: Havasvölgyi Ottó
Date:
Subject: Re: feeding big script to psql
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Slow Inserts on 1 table?