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

Curious about dead rows.

From: Jean-David Beyer <jeandavid8(at)verizon(dot)net>
To: pgsql performance <pgsql-performance(at)postgresql(dot)org>
Subject: Curious about dead rows.
Date: 2007-11-10 16:27:07
Message-ID: 4735DBDB.5050208@verizon.net (view raw or flat)
Thread:
Lists: pgsql-performance
I am doing lots of INSERTs on a table that starts out empty (I did a
TRUNCATE on it). I am not, AFAIK, doing DELETEs or UPDATEs. Autovacuum is
on. I moved logging up to debug2 level to see what was going on, and I get
things like this:

 "vl_as": scanned 3000 of 5296 pages, containing 232944 live rows and 1033
dead rows; 3000 rows in sample, 411224 estimated total rows

A little later, it says:

"vl_as": scanned 3000 of 6916 pages, containing 233507 live rows and 493
dead rows; 3000 rows in sample, 538311 estimated total rows

(I suppose that means autovacuum is working.) Is this normal, or have I got
something wrong? Why so many dead rows when just doing inserts? It is not
that I think the number is too high, considering the number of rows in the
table at the point where I copied this line. It is just that I do not
understand why there are any.

I could easily understand it if I were doing UPDATEs.

postgresql-8.1.9-1.el5

-- 
  .~.  Jean-David Beyer          Registered Linux User 85642.
  /V\  PGP-Key: 9A2FC99A         Registered Machine   241939.
 /( )\ Shrewsbury, New Jersey    http://counter.li.org
 ^^-^^ 11:15:01 up 18 days, 4:33, 4 users, load average: 6.18, 5.76, 5.26

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2007-11-10 17:08:11
Subject: Re: Curious about dead rows.
Previous:From: Russell SmithDate: 2007-11-10 05:26:17
Subject: Re: Join performance

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