Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A8F399FBA05 for ; Tue, 12 Jun 2007 11:30:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 47737-07 for ; Tue, 12 Jun 2007 11:30:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 5EC999FB9E7 for ; Tue, 12 Jun 2007 11:30:38 -0300 (ADT) Received: from trofast.ipv6.sesse.net ([2001:700:300:1803:20e:cff:fe36:a766] helo=trofast.sesse.net) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1Hy7OD-0005M9-Me; Tue, 12 Jun 2007 16:30:33 +0200 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1Hy7OD-0002FV-00; Tue, 12 Jun 2007 16:30:33 +0200 Date: Tue, 12 Jun 2007 16:30:33 +0200 From: "Steinar H. Gunderson" To: Christo Du Preez Cc: pgsql-performance@postgresql.org Subject: Re: test / live environment, major performance difference Message-ID: <20070612143033.GA8541@uio.no> Mail-Followup-To: Christo Du Preez , pgsql-performance@postgresql.org References: <466EA078.20601@mecola.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <466EA078.20601@mecola.com> X-Operating-System: Linux 2.6.20.4 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/209 X-Sequence-Number: 25242 On Tue, Jun 12, 2007 at 03:32:40PM +0200, Christo Du Preez wrote: > As an example I took a table with about 650 rows, having a parentid > field with an index on parentid. Try a bigger table. Using an index for only 650 rows is almost always suboptimal, so it's no wonder the planner doesn't use the index. /* Steinar */ -- Homepage: http://www.sesse.net/