pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shaun Thomas <sthomas@peak6.com>
To: felix <crucialfelix@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Really really slow select count(*)
Date: Fri, 4 Feb 2011 11:45:22 -0600
Message-ID: <4D4C3B32.8070607@peak6.com> (raw)
In-Reply-To: <AANLkTikN75hcCL5Nhgh8Z9c7ZLtduMdjsn07BgO_D_yZ@mail.gmail.com>
References: <AANLkTinAJcm5A+i1O_R87aiYyu8N2OWgoaL9RfR=tUR9@mail.gmail.com>
	<4D4C138C.7010304@2ndquadrant.com>
	<4D4C1555.40209@peak6.com>
	<AANLkTikrS5JkJDMjAXpcRWRnuLbX+MHB=CWb_mFa9qb-@mail.gmail.com>
	<4D4C2AC3.5020804@peak6.com>
	<AANLkTikN75hcCL5Nhgh8Z9c7ZLtduMdjsn07BgO_D_yZ@mail.gmail.com>

On 02/04/2011 11:38 AM, felix wrote:

> CPU 0.00s/0.00u sec elapsed 0.00 sec.
> INFO:  analyzing "public.fastadder_fastadderstatus"
> INFO: "fastadder_fastadderstatus": scanned 2492 of 2492 pages,
> containing 154378 live rows and 0 dead rows; 30000 rows in sample,
> 154378 estimated total rows
>
> and there's nothing at the end of the whole vacuum output about pages

I'm not sure if it gives it to you if you pick a single DB, but if you 
use -a for all, you should get something at the very end like this:

INFO:  free space map contains 1365918 pages in 1507 relations
DETAIL:  A total of 1326656 page slots are in use (including overhead).
1326656 page slots are required to track all free space.
Current limits are:  3000000 page slots, 3500 relations, using 38784 kB.
VACUUM

That's on our dev system. Your dev table seems properly sized, but prod 
probably isn't. If you run an all-database vacuum after-hours, you'll 
see the stuff at the end. And if your 'page slots are required' is 
greater than your 'page slots are in use,' you've got a problem.

-- 
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
sthomas@peak6.com

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email



view thread (66+ messages)  latest in thread

Message-ID: <4D4C3B32.8070607@peak6.com>
Permalink:  ../4D4C3B32.8070607@peak6.com/
Also on:    postgresql.org/message-id/4D4C3B32.8070607@peak6.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sthomas@peak6.com, crucialfelix@gmail.com
  Subject: Re: Really really slow select count(*)
  In-Reply-To: <4D4C3B32.8070607@peak6.com>

* 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