Re: Peculiar performance observation.... - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Peculiar performance observation....
Date
Msg-id 1110822787.28555.50.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: Peculiar performance observation....  ("Net Virtual Mailing Lists" <mailinglists@net-virtual.com>)
Responses Re: Peculiar performance observation....  ("Net Virtual Mailing Lists" <mailinglists@net-virtual.com>)
List pgsql-general
On Mon, 2005-03-14 at 06:11, Net Virtual Mailing Lists wrote:
> Hello,
>
>
> I am sorry to bring this up again.... Does anyone have any idea what
> might be going on here?...   I'm very worried about this situation.. ;-(

It looks to me like either you're not analyzing often enough, or your
statistics target is too low to get a good sample.  Note your estimated
versus real rows are off by a factor of 70 (28 est. versus 1943 actual
rows). That's a pretty big difference, and where you should be looking.

> >   ->  Seq Scan on jobdata  (cost=0.00..7567.88 rows=28 width=52) (actual
> >time=11.498..4800.907 rows=1943 loops=1)

Yes, this is because PostgreSQL is using an index to approximate a
sequential scan, which is not a good thing since PostgreSQL can't get
all the information it needs from just an index, but has to visit the
table to check visibility.

pgsql-general by date:

Previous
From: Chris Travers
Date:
Subject: Re: sql question
Next
From: Karsten Hilbert
Date:
Subject: Re: Best practices: Handling Daylight-saving time