Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 303939FB30E for ; Fri, 13 Jul 2007 15:28:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49644-05 for ; Fri, 13 Jul 2007 15:27:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by postgresql.org (Postfix) with ESMTP id 52B7B9FA6B5 for ; Fri, 13 Jul 2007 15:27:57 -0300 (ADT) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1I9Prq-0003wj-1p for pgsql-performance@postgresql.org; Fri, 13 Jul 2007 11:27:50 -0700 Message-ID: <11585080.post@talk.nabble.com> Date: Fri, 13 Jul 2007 11:27:50 -0700 (PDT) From: smiley2211 To: pgsql-performance@postgresql.org Subject: Re: Database Statistics??? In-Reply-To: <4697B8C7.7030304@jobflash.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: smiley2211@yahoo.com References: <11583450.post@talk.nabble.com> <4697B8C7.7030304@jobflash.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.961 tagged_above=0 required=5 tests=AWL=-0.366, BAYES_00=-2.599, DNS_FROM_OPENWHOIS=1.13, FORGED_YAHOO_RCVD=2.297, WHOIS_MYPRIVREG=1.499 X-Spam-Level: * X-Archive-Number: 200707/162 X-Sequence-Number: 25846 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.