X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 89B599FB272 for ; Tue, 8 Aug 2006 09:48:16 -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 70196-10 for ; Tue, 8 Aug 2006 09:48:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from my.endian.it (unknown [62.146.87.34]) by postgresql.org (Postfix) with ESMTP id 701BF9FB21D for ; Tue, 8 Aug 2006 09:48:09 -0300 (ADT) Received: from dell.home.lan (host177-104.pool875.interbusiness.it [87.5.104.177]) (authenticated (0 bits)) by my.endian.it (8.11.6/8.11.6) with ESMTP id k78CtrT23260; Tue, 8 Aug 2006 14:55:53 +0200 Subject: Re: Query response time From: Chris Mair To: Jonathan Sinclair Cc: pgsql-sql@postgresql.org In-Reply-To: <746457F7E51F3B4BB53A8447D7204B78E456@MVGMAIL.mvg.local> References: <746457F7E51F3B4BB53A8447D7204B78E456@MVGMAIL.mvg.local> Content-Type: text/plain Date: Tue, 08 Aug 2006 14:48:06 +0200 Message-Id: <1155041286.3802.8.camel@dell.home.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-27) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.185 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/48 X-Sequence-Number: 26006 > I am using PostgresSQL 7.4 and having some serious performance issues. > Trawling through the archives and previous posts the only visible advice > I could see was either by running vacuum or setting the fsynch flag to > false. > > I am using tables that only contain approx 2GB of data. However > performing a number of simple conditional select statements takes a > great deal of time. Putting limits on the data obviously reduces the > time, but there is still a delay. (Note: on one particular query I set > the limit to 538 and the query returns in under 2mins if the limit > becomes 539 the query loops indefinitely!) > >From previous experience I know these delays are longer than both > Informix and MySql. In some instances it takes so long I end up having > to kill the query. Please run the command "analyze" on your database (you can do that with the psql shell), then post to this list: - your query - the output of the command "explain + your query" - the layout of the tables concerned by the query ( "\d tablename" from psql) > The install was performed by yum onto a RAID server using Centos. I am > sure there is something fundamentally wrong for I can't believe that > postgres would have the reputation it has based on the statistics I'm > getting. Does anyone have any advice? > The data I am using was imported from an Informix system as part of a > migration strategy. > I know this is long shot but I hope someone can shed some light. If you're on pgsql-performance@postgresql.org as well, we might continue discussion there. Bye :) Chris. -- Chris Mair http://www.1006.org