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

Re: Database Statistics???

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: smiley2211 <smiley2211(at)yahoo(dot)com>
Subject: Re: Database Statistics???
Date: 2007-07-13 18:19:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
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 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;

In response to

pgsql-performance by date

Next:From: smiley2211Date: 2007-07-13 18:27:50
Subject: Re: Database Statistics???
Previous:From: Ansgar -59cobalt- WiechersDate: 2007-07-13 17:52:49
Subject: Re: Database Statistics???

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