Skip site navigation (1) Skip section navigation (2)

Re: postgresql meltdown on

From: Joe Conway <mail(at)joeconway(dot)com>
To: Aaron Krowne <akrowne(at)vt(dot)edu>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: postgresql meltdown on
Date: 2003-03-16 11:29:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Aaron Krowne wrote:
>>- What version of Postgres?
> 7.2.1

You should definitely look at upgrading, at least to 7.2.4 (which you 
can do without requiring a dump/reload cycle), but better yet to 7.3.2 
(which will require a dump/reload cycle). I don't know that will fix you 
specific issue, but there were some critical bug fixes between 7.2.1 and 

>>- Does the database see mostly SELECTs and INSERTs, or are there many
>>  UPDATEs and/or DELETEs too?
> Almost exclusively SELECTs.
> OK, I have just run a VACUUM FULL ANALYZE and things seem much better...

Hmmm, do you periodically do large updates or otherwise turn over rows 
in batches?

> which would be the first time its really made a difference =)  I tried
> comparing an EXPLAIN ANALYZE of a single row select on the main objects
> table before and after the vacuum, and the plan didn't change
> (sequential scan still), but the response time went from ~1 second to
> ~5msec!  I'm not really sure what could have happened here
> behind-the-scenes since it didn't start using the index, and there
> probably weren't more than 10% updated/added rows since the last VACUUM.

If your app is mostly doing equi-lookups by primary key, and indexes 
aren't being used (I think I saw you mention that on another post), then 
something else is still wrong. Please pick one or two typical queries 
that are doing seq scans and post the related table definitions, 
indexes, SQL, and EXPLAIN ANALYZE. I'd bet you are getting bitten by a 
datatype mismatch or something.


In response to

pgsql-performance by date

Next:From: Christopher Kings-LynneDate: 2003-03-17 02:08:10
Subject: Re: postgresql meltdown on
Previous:From: Tom LaneDate: 2003-03-16 08:37:32
Subject: Re: postgresql meltdown on

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group