X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1D7DCD1C910 for ; Wed, 6 Aug 2003 21:47:51 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 86388-04 for ; Wed, 6 Aug 2003 18:46:30 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 72ED4D1C91D for ; Wed, 6 Aug 2003 18:47:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h76LlaSa009141; Wed, 6 Aug 2003 17:47:36 -0400 (EDT) To: Sebastien Lemieux Cc: Postgresql-performance Subject: Re: How to efficiently duplicate a whole schema? In-reply-to: References: Comments: In-reply-to Sebastien Lemieux message dated "Wed, 06 Aug 2003 17:22:05 -0400" Date: Wed, 06 Aug 2003 17:47:36 -0400 Message-ID: <9140.1060206456@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/122 X-Sequence-Number: 2939 Sebastien Lemieux writes: > On Wed, 6 Aug 2003, Tom Lane wrote: >> The idea here is to make sure that the planner's statistics reflect the >> "full" state of the table, not the "empty" state. Otherwise it may pick >> plans for the foreign key checks that are optimized for small tables. > I added the 'analyze' but without any noticable gain in speed. I can't > use 'truncate' since I need to 'set constraints all deferred'. What are you using, exactly? regards, tom lane