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 ACEB99FB28C for ; Tue, 15 Aug 2006 17:57:47 -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 39708-04 for ; Tue, 15 Aug 2006 17:57:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 11B059FB274 for ; Tue, 15 Aug 2006 17:57:47 -0300 (ADT) Received: from [192.168.42.113] (natpool.bovine.net [67.100.216.14]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by noel.decibel.org (Postfix) with ESMTP id 0999B56423; Tue, 15 Aug 2006 15:57:44 -0500 (CDT) In-Reply-To: <20060815185335.14227.qmail@web36114.mail.mud.yahoo.com> References: <20060815185335.14227.qmail@web36114.mail.mud.yahoo.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <165A9949-55BC-4BFC-9CEF-4F54B23731BE@pervasive.com> Cc: Performance PostgreSQL Content-Transfer-Encoding: quoted-printable From: Jim Nasby Subject: Re: Inner Join of the same table Date: Tue, 15 Aug 2006 14:27:49 -0500 To: sebaioni-postgresql@yahoo.com.ar X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/251 X-Sequence-Number: 20436 On Aug 15, 2006, at 1:53 PM, Sebasti=E1n Baioni wrote: > 9 -> Index Scan using uesapt001 on =20 > APORTES (cost=3D0.00..37301678.64 > rows=3D9339331 width=3D25) (actual time=3D110.000..2520690.000 =20 > rows=3D9335892 loops=3D1) It's taking 2520 seconds to scan an index with 9M rows, which sounds =20 way, way too slow. I suspect that index got bloated badly at some =20 point by not vacuuming frequently enough (autovacuum is your friend). =20= Try reindexing and see if that fixes the problem. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461