Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1kzi-00067r-0m for pgsql-performance@postgresql.org; Wed, 15 Aug 2012 21:19:14 +0000 Received: from tempest.mainecoon.com ([69.12.217.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1kzf-0002IW-Js for pgsql-performance@postgresql.org; Wed, 15 Aug 2012 21:19:13 +0000 Received: from [10.1.1.2] (fw.boscorama.com [75.101.8.88]) by tempest.mainecoon.com (Postfix) with ESMTPSA id CECF86EA0A2 for ; Wed, 15 Aug 2012 14:19:08 -0700 (PDT) Message-ID: <502C124C.5080102@boscorama.com> Date: Wed, 15 Aug 2012 14:19:08 -0700 From: Bosco Rama User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20120715 Firefox/14.0.1 SeaMonkey/2.11 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: cluster on conditional index? References: <20120814172910.GP27500@aart.rice.edu> <502C0F0E.2010503@agliodbs.com> In-Reply-To: <502C0F0E.2010503@agliodbs.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/89 X-Sequence-Number: 47627 On 08/15/12 14:05, Josh Berkus wrote: > >> That actually makes sense to me. Cluster the rows covered by that >> index, let the rest fall where they may. I'm typically only accessing >> the rows covered by that index, so I'd get the benefit of the cluster >> command but wouldn't have to spend cycles doing the cluster for rows I >> don't care about. > > Sure, that's a feature request though. And thinking about it, I'm > willing to bet that it's far harder to implement than it sounds. > > In the meantime, you could ad-hoc this by splitting the table into two > partitions and clustering one of the two partitions. Wouldn't creating a second index on the boolean itself and then clustering on that be much easier? Bosco.