Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 98F7B63353E for ; Tue, 22 Jun 2010 20:44:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 60754-08 for ; Tue, 22 Jun 2010 23:44:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (unknown [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 94564632D17 for ; Tue, 22 Jun 2010 20:44:45 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 7F481348035; Tue, 22 Jun 2010 16:44:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qjahXlzZfkif; Tue, 22 Jun 2010 16:44:18 -0700 (PDT) Received: from perhan.alvh.no-ip.org (190-95-17-80.bk17-dsl.surnet.cl [190.95.17.80]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 12815348002; Tue, 22 Jun 2010 16:44:18 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 768C66E648; Tue, 22 Jun 2010 19:44:15 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: pgsql-performance Subject: Re: slow index lookup From: Alvaro Herrera To: Anj Adu In-reply-to: References: Date: Tue, 22 Jun 2010 19:44:15 -0400 Message-Id: <1277250226-sup-6686@alvh.no-ip.org> User-Agent: Sup/0.11 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.107 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RDNS_NONE=0.793 X-Spam-Level: X-Archive-Number: 201006/381 X-Sequence-Number: 39237 Excerpts from Anj Adu's message of mar jun 22 17:44:39 -0400 2010: > This query seems unreasonable slow on a well-indexed table (13 million > rows). Separate indexes are present on guardid_id , from_num and > targetprt columns. Maybe you need to vacuum or reindex? -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support