X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C115DD1B437 for ; Wed, 17 Dec 2003 06:00:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 73570-03 for ; Wed, 17 Dec 2003 02:00:17 -0400 (AST) Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) by svr1.postgresql.org (Postfix) with ESMTP id 35D35D1B43F for ; Wed, 17 Dec 2003 02:00:16 -0400 (AST) Received: from tokyo.samurai.com (d226-89-59.home.cgocable.net [24.226.89.59]) by bob.samurai.com (Postfix) with ESMTP id E179223BC; Wed, 17 Dec 2003 01:00:14 -0500 (EST) To: "david@shadovitz.com" Cc: "pgsql-performance@postgresql.org" Subject: Re: Why is restored database faster? From: Neil Conway In-Reply-To: <01C3C415.93ADBCE0.david@shadovitz.com> (David Shadovitz's message of "Tue, 16 Dec 2003 20:42:58 -0800") References: <01C3C415.93ADBCE0.david@shadovitz.com> Date: Wed, 17 Dec 2003 01:00:13 -0500 Message-ID: <87iskgugpe.fsf@mailbox.samurai.com> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/250 X-Sequence-Number: 5110 David Shadovitz writes: > What could account for this difference? Lots of things -- disk fragmentation, expired tuples that aren't being cleaned up by VACUUM due to a long-lived transaction, the state of the kernel buffer cache, the configuration of the kernel, etc. > How can I get the original server to perform as well as the new one? Well, you can start by giving us some more information. For example, what is the output of VACUUM VERBOSE on the slow server? How much disk space does the database directory take up on both machines? (BTW, "SELECT count(*) FROM table" isn't a particularly good DBMS performance indication...) -Neil