pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: nobody <nobody@nowhere.near.here>
To: pgsql-admin@postgresql.org
Subject: Re: Vacuum stats interpreted?
Date: Wed, 26 Nov 2003 17:52:12 -0000
Message-ID: <bq2p8p$2vh3$1@news.hub.org> (raw)
References: <6b79e0aa2a1c3668937e1ce087c4a819@news.teranews.com>

To test your theory about COMMIT; BEGIN; you could check the PostgreSQL log,
it is likely to contain a line:

WARNING: there is no transaction in progress

"Jeff Boes" <jboes@qtm.net> wrote in message
news:6b79e0aa2a1c3668937e1ce087c4a819@news.teranews.com...
> Our largest (by total byte count) table has a nearly-equal flow of data in
and
> out on a daily basis (that is, we add some 40k rows during the day, and
then
> every night expire stuff that is timestamped beyond our cutoff, which
results in
> about 40k deletions).
>
> After the deletions, the table gets vacuumed (not FULL):
>
> INFO:  --Relation public.articles_content--
> INFO:  Index ix_articles_content_pk: Pages 398; Tuples 180175: Deleted 0.
>         CPU 0.00s/0.08u sec elapsed 0.08 sec.
> INFO:  Removed 122 tuples in 77 pages.
>         CPU 0.00s/0.01u sec elapsed 0.02 sec.
> INFO:  Pages 3886: Changed 0, Empty 0; Tup 180175: Vac 122, Keep 26437,
UnUsed
> 135721.
>         Total CPU 0.02s/0.17u sec elapsed 0.19 sec.
> INFO:  --Relation pg_toast.pg_toast_634643688--
> INFO:  Index pg_toast_634643688_index: Pages 27156; Tuples 1256923:
Deleted 732.
>         CPU 2.32s/0.80u sec elapsed 27.93 sec.
> INFO:  Removed 732 tuples in 250 pages.
>         CPU 0.01s/0.04u sec elapsed 0.05 sec.
> INFO:  Pages 1667633: Changed 71514, Empty 0; Tup 1256923: Vac 732, Keep
172914,
> UnUsed 5499031.
>         Total CPU 148.07s/12.52u sec elapsed 809.71 sec.
> INFO:  Analyzing public.articles_content
>
> The "Keep" and "UnUsed" numbers seem high to me, compared to other tables.
Can
> anyone interpret these and tell me anything about what we could do with
this
> table to make it "look" better? (I'm not convinced that the extra space
affects
> anything but sequential scans, and we don't do that to this table.)
>
> If it helps: I have a theory that database connections from our webserver
(which
> is running PHP and mod_perl) are in "idle in transaction" states (in other
> words, they issue "Commit; Begin;" and then sleep), which causes the
tables to
> retain bulk (nice image, eh?).
>





view thread (6+ messages)  latest in thread

Message-ID: <bq2p8p$2vh3$1@news.hub.org>
Permalink:  ../bq2p8p$2vh3$1@news.hub.org/
Also on:    postgresql.org/message-id/bq2p8p$2vh3$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: nobody@nowhere.near.here
  Subject: Re: Vacuum stats interpreted?
  In-Reply-To: <bq2p8p$2vh3$1@news.hub.org>
  References: <6b79e0aa2a1c3668937e1ce087c4a819@news.teranews.com> <bq2p8p$2vh3$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox