Re: Database Statistics???

From: smiley2211 <smiley2211(at)yahoo(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Database Statistics???
Date: 2007-07-13 18:27:50
Message-ID: 11585080.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Thanks Tom and Scott...that worked for a NEW database but not on the original
SLOW database...meaning - I backed up the SLOW database and restored it to a
NEW database and the query ran EXTREMELY FAST :clap:

Scott - (your question - What was the size of the slow databases data store
compared to the
fast database? --- I am new, how do I know the size of the database (OS file
size ??))...is there an sp_helpdb equivalent command??

My EXPLAINS are under a previous thread:

Query is taking 5 HOURS to Complete on 8.1 version

Thanks...Michelle

Tom Arthurs wrote:
>
> 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.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>

--
View this message in context: http://www.nabble.com/Database-Statistics----tf4075655.html#a11585080
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Pavel Stehule 2007-07-13 19:12:34 Re: TRUNCATE TABLE
Previous Message Mario Weilguni 2007-07-13 18:19:51 Re: Database Statistics???