Re: Why pgAdmin III guru suggests VACUUM in 8.1 - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: Why pgAdmin III guru suggests VACUUM in 8.1
Date
Msg-id 20051122185356.GS19279@pervasive.com
Whole thread Raw
In response to Why pgAdmin III guru suggests VACUUM in 8.1  ("Andrus Moor" <eetasoft@online.ee>)
List pgsql-general
Keep in mind that if analyze has never been run on a table the database
will assume 1000 rows, which is definately off from 122 rows.

You might want to ask on the pgAdmin list. Though I'd recommend against
calling the guru 'stupid' over there. :)

On Sun, Nov 20, 2005 at 09:13:36PM +0200, Andrus Moor wrote:
> I'm using Postgres 8.1 in Windows XP
>
> Sometimes when using pgAdmin the following Guru hint appears suddenly:
>
> "Running VACUUM recommended
> The estimated rowcount on the table "firma1.algsa" deviates significantly
> from the actual rowcount. You should run VACUUM ANALYZE on this table.
> Instead of issuing a manual VACUUM ANALYZE command on this table (you can
> use the pgAdmin III maintenance menu for this), running VACUUM ANALYZE on a
> regular or automated basis should be considered. This can be achieved using
> a scheduler. PostgreSQL also supplies the pg_autovacuum daemon, which will
> track changes made to the database and issue vacuum commands as required
> automatically. In most cases, pg_autovacuum will be the best choice. "
>
> I have noticed in Postgres log, that autovacuum processes my cluster
> regulary.
> So in my knowledge, this hint is wrong.
> Please confirm that guru is stupid.
>
> Also I followed this hint and got the results:
>
> INFO:  vacuuming "firma1.algsa"
> INFO:  index "algsa_pkey" now contains 122 row versions in 2 pages
> DETAIL:  0 index pages have been deleted, 0 are currently reusable.
> CPU 0.00s/0.00u sec elapsed 0.06 sec.
> INFO:  "algsa": found 0 removable, 122 nonremovable row versions in 4 pages
> DETAIL:  0 dead row versions cannot be removed yet.
> There were 0 unused item pointers.
> 0 pages are entirely empty.
> CPU 0.00s/0.00u sec elapsed 0.06 sec.
> INFO:  analyzing "firma1.algsa"
> INFO:  "algsa": scanned 4 of 4 pages, containing 122 live rows and 0 dead
> rows; 122 rows in sample, 122 estimated total rows
>
> So it seems that vacuum did make anything.
>
> Andrus.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-general by date:

Previous
From: Dennis Veatch
Date:
Subject: Re: Best way to represent values.
Next
From: "Andrus"
Date:
Subject: Re: Why pgAdmin III guru suggests VACUUM in 8.1