Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 13521632A2E for ; Mon, 30 Nov 2009 23:55:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 35949-08 for ; Tue, 1 Dec 2009 03:55:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id B205A6327AB for ; Mon, 30 Nov 2009 23:55:15 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id nB13tCaL019190; Mon, 30 Nov 2009 22:55:12 -0500 (EST) To: Bryce Nesbitt cc: pgsql-sql@postgresql.org Subject: Re: pg_restore followed by immediate VACUUM ANALYZE In-reply-to: <4B1491A3.6080602@obviously.com> References: <4B1491A3.6080602@obviously.com> Comments: In-reply-to Bryce Nesbitt message dated "Mon, 30 Nov 2009 19:46:43 -0800" Date: Mon, 30 Nov 2009 22:55:12 -0500 Message-ID: <19189.1259639712@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/86 X-Sequence-Number: 33437 Bryce Nesbitt writes: > I looking at a script that does a pg_restore followed by an immediate > VACUUM ANALYZE (postgres 8.3). That's standard. > Does pg_restore not update the query planner statistics? Correct. Autovacuum might fix them eventually, but usually it's worth forcing the issue once you've completed your data loading. (This might involve multiple steps, which is why pg_restore doesn't try to force it for you.) regards, tom lane