Re: Database Statistics???

From: Tom Arthurs <tarthurs(at)jobflash(dot)com>
To: smiley2211 <smiley2211(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Database Statistics???
Date: 2007-07-13 17:39:19
Message-ID: 4697B8C7.7030304@jobflash.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

smiley2211 wrote:
> 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.
>
You can update statistics with the analyze or vacuum analyze command,
but I'd bet what you are seeing here is the effect of recreating the
indices that replaying a backup does.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Ansgar -59cobalt- Wiechers 2007-07-13 17:52:49 Re: Database Statistics???
Previous Message Alvaro Herrera 2007-07-13 17:35:01 Re: TRUNCATE TABLE