pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ansgar -59cobalt- Wiechers <lists@planetcobalt.net>
To: pgsql-performance@postgresql.org
Subject: Re: Database Statistics???
Date: Fri, 13 Jul 2007 19:52:49 +0200
Message-ID: <20070713175249.GA25103@mail.planetcobalt.net> (raw)
In-Reply-To: <11583450.post@talk.nabble.com>
References: <11583450.post@talk.nabble.com>

On 2007-07-13 smiley2211 wrote:
> 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...

EXPLAIN ANALYZE'ing the query will show you the planner's estimates. The
query plans should give you an idea of what the problem actually is. Did
you already run ANALYZE on the database?

> 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??

Not with the database, but in the pg_statistic catalog, AFAIK.

> if so, how do I UPDATE view or update them?

You collect statistics by ANALYZE'ing either particular tables or the
entire database. They can be viewed in the pg_catalog.pg_statistic
table. However, viewing the query plans for your queries will probably
be more telling.

Regards
Ansgar Wiechers
-- 
"The Mac OS X kernel should never panic because, when it does, it
seriously inconveniences the user."
--http://developer.apple.com/technotes/tn2004/tn2118.html



view thread (6+ messages)  latest in thread

Message-ID: <20070713175249.GA25103@mail.planetcobalt.net>
Permalink:  ../20070713175249.GA25103@mail.planetcobalt.net/
Also on:    postgresql.org/message-id/20070713175249.GA25103@mail.planetcobalt.net

 · 

reply

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: lists@planetcobalt.net
  Subject: Re: Database Statistics???
  In-Reply-To: <20070713175249.GA25103@mail.planetcobalt.net>

* 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