X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 46C8A9FA42B for ; Mon, 12 Jun 2006 12:05:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 63613-06 for ; Mon, 12 Jun 2006 12:05:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 1D53F9F9316 for ; Mon, 12 Jun 2006 12:05:12 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id k5CF57sg041487 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Jun 2006 09:05:09 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.6/8.13.6) with ESMTP id k5CF56gQ050859; Mon, 12 Jun 2006 09:05:06 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.6/8.13.6/Submit) id k5CF56U7050858; Mon, 12 Jun 2006 09:05:06 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 12 Jun 2006 09:05:06 -0600 From: Michael Fuhr To: Ruben Rubio Rey Cc: pgsql-performance@postgresql.org Subject: Re: Posrgres speed problem Message-ID: <20060612150506.GA50764@winnie.fuhr.org> References: <448D7C81.1000108@rentalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <448D7C81.1000108@rentalia.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/134 X-Sequence-Number: 19491 On Mon, Jun 12, 2006 at 04:38:57PM +0200, Ruben Rubio Rey wrote: > I have two similar servers, one in production and another for testing > purposes. > Databases are equal (with a difference of some hours) > > In the testing server, an sql sentence takes arround 1 sec. > In production server (low server load) takes arround 50 secs, and uses > too much resources. > > Explain analyze takes too much load, i had to cancel it! The EXPLAIN ANALYZE output would be helpful, but if you don't want to run it to completion then please post the output of EXPLAIN ANALYZE for the fast system and EXPLAIN (without ANALYZE) for the slow one. As someone else asked, are you running ANALYZE regularly? What about VACUUM? -- Michael Fuhr