X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id EDCA79DCAB0 for ; Tue, 21 Mar 2006 11:49:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02787-01 for ; Tue, 21 Mar 2006 11:49:41 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp106.sbc.mail.mud.yahoo.com (smtp106.sbc.mail.mud.yahoo.com [68.142.198.205]) by postgresql.org (Postfix) with SMTP id 5DCF39DCA30 for ; Tue, 21 Mar 2006 11:49:34 -0400 (AST) Received: (qmail 15455 invoked from network); 21 Mar 2006 15:49:35 -0000 Received: from unknown (HELO discord.dyndns.org) (jeffroe996@sbcglobal.net@69.226.253.111 with plain) by smtp106.sbc.mail.mud.yahoo.com with SMTP; 21 Mar 2006 15:49:33 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by discord.dyndns.org (8.13.4/8.13.4) with ESMTP id k2LFnOnr001220; Tue, 21 Mar 2006 07:49:26 -0800 Date: Tue, 21 Mar 2006 07:49:24 -0800 (PST) From: Jeff Frost X-X-Sender: jeff@discord.dyndns.org To: Daniel Caune cc: pgsql-sql@postgresql.org Subject: Re: Power cut and performance problem In-Reply-To: <1E293D3FF63A3740B10AD5AAD88535D201D30868@UBIMAIL1.ubisoft.org> Message-ID: References: <1E293D3FF63A3740B10AD5AAD88535D201D30868@UBIMAIL1.ubisoft.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.118 required=5 tests=[AWL=0.118] X-Spam-Score: 0.118 X-Spam-Level: X-Archive-Number: 200603/332 X-Sequence-Number: 24678 On Tue, 21 Mar 2006, Daniel Caune wrote: > For example, the execution of the following query is fast as it used to > be (gslog_event_id is the primary key on gslog_event): > > select max(gslog_event_id) from gslog_event; (=> Time: 0.773 ms) > > > while the following query is really slow (several minutes): > > select min(gslog_event_id) from gslog_event; (index on the primary key > is taken) > > > I'm not a hardware expert at all, but I supposed that the whole > performance would be degraded when a problem occurs with RAID disks. Am > I wrong? Could it be something else? Are there some tools that check > the state of a PostgreSQL database? You would be correct, a hardware problem should manifest itself on both those queries. What is the explain analyze output of those two queries? It's possible you have a corrupt index on gslog_event. If that's the case, a reindex would likely remedy the problem. Is postgres logging any errors? -- Jeff Frost, Owner Frost Consulting, LLC http://www.frostconsultingllc.com/ Phone: 650-780-7908 FAX: 650-649-1954