From: Mario Weilguni <mweilguni@sime.com>
To: pgsql-performance@postgresql.org
Cc: smiley2211 <smiley2211@yahoo.com>
Subject: Re: Database Statistics???
Date: Fri, 13 Jul 2007 20:19:51 +0200
Message-ID: <200707132019.51450.mweilguni@sime.com> (raw)
In-Reply-To: <11583450.post@talk.nabble.com>
References: <11583450.post@talk.nabble.com>
Am Freitag 13 Juli 2007 schrieb smiley2211:
> Hello all,
>
> I am a bit confused...I have a database which was performing very POORLY
> selecting from a view (posted earlier) on one server but extremely fast on
> another server...
>
> I just backed up the database from the FAST server and loaded to the SLOW
> server and it ran just as fast as it originally did...my questions are:
>
> Are STATISTICS some how saved with the database?? if so, how do I UPDATE
> view or update them?
>
> Should I backup the data \ drop the database and reload it to make it get
> new stats?? (vacuum analyze does nothing for this poor performing database)
>
> Thanks-a-bunch.
Try this on both machines:
select relname, relpages, reltuples
from pg_class
where relkind='i'
order by relpages desc limit 20;
Compare the results, are relpages much higher on the slow machine?
If so, REINDEX DATABASE slow_database;
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: mweilguni@sime.com, smiley2211@yahoo.com
Subject: Re: Database Statistics???
In-Reply-To: <200707132019.51450.mweilguni@sime.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