Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ500-0003V3-HF for pgsql-performance@postgresql.org; Thu, 15 Nov 2012 19:21:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ4zz-0000Go-3L for pgsql-performance@postgresql.org; Thu, 15 Nov 2012 19:21:15 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qAFJLDPF020479; Thu, 15 Nov 2012 14:21:13 -0500 (EST) From: Tom Lane To: Dave Cramer cc: pgsql-performance Subject: Re: performance regression with 9.2 In-reply-to: References: Comments: In-reply-to Dave Cramer message dated "Mon, 12 Nov 2012 14:49:00 -0500" Date: Thu, 15 Nov 2012 14:21:13 -0500 Message-ID: <20478.1353007273@sss.pgh.pa.us> X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201211/179 X-Sequence-Number: 48545 Dave Cramer writes: > This query is a couple orders of magnitude slower the first result is > 9.2.1, the second 9.1 Thanks for sending me the test case off-list. I found the reason why I'd not been able to reproduce the problem: the index you're hoping it will use is declared "note_sets_parent_id_idx" btree (parent_id) WHERE parent_id IS NOT NULL Apparently 9.2 is less bright than 9.1 about when it can use a partial index. I'm not sure where I broke that, but will look. regards, tom lane