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

Re: Insertion to temp table deteriorating over time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Steven Flatt" <steven(dot)flatt(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Insertion to temp table deteriorating over time
Date: 2006-12-15 17:09:46
Message-ID: 11651.1166202586@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Steven Flatt" <steven(dot)flatt(at)gmail(dot)com> writes:
> Here's the output of "VACUUM VERBOSE pg_class".  I think it looks fine.  I
> even did it three times in a row, each about 10 minutes apart, just to see
> what was changing:

Hm, look at the numbers of rows removed:

> INFO:  "pg_class": found 5680 removable, 3263 nonremovable row versions in
> 625 pages
> DETAIL:  0 dead row versions cannot be removed yet.

> INFO:  "pg_class": found 24 removable, 3263 nonremovable row versions in 625
> pages
> DETAIL:  0 dead row versions cannot be removed yet.

> INFO:  "pg_class": found 0 removable, 3263 nonremovable row versions in 625
> pages
> DETAIL:  0 dead row versions cannot be removed yet.

The lack of unremovable dead rows is good, but why were there so many
dead rows the first time?  You didn't say what the cycle time is on your
truncate-and-refill process, but the last two suggest that the average
rate of accumulation of dead pg_class rows is only a couple per minute,
in which case it's been a lot longer than an hour since the previous
VACUUM of pg_class.  I'm back to suspecting that you don't vacuum
pg_class regularly.  You mentioned having an hourly cron job to fire off
vacuums ... are you sure it's run as a database superuser?

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: RonDate: 2006-12-15 17:24:46
Subject: Re: New to PostgreSQL, performance considerations
Previous:From: RonDate: 2006-12-15 16:55:52
Subject: Re: [HACKERS] EXPLAIN ANALYZE on 8.2

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