Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WyyYN-0005GT-Je for pgsql-performance@arkaria.postgresql.org; Mon, 23 Jun 2014 07:20:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WyyYM-0005Il-SL for pgsql-performance@arkaria.postgresql.org; Mon, 23 Jun 2014 07:20:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WyyYL-0005Ie-NK for pgsql-performance@postgresql.org; Mon, 23 Jun 2014 07:20:33 +0000 Received: from mo69.mail-out.ovh.net ([178.32.228.69]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WyyYI-0005Ie-Pc for pgsql-performance@postgresql.org; Mon, 23 Jun 2014 07:20:32 +0000 Received: from mail409.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo69.mail-out.ovh.net (Postfix) with SMTP id 4FCDFFFA3F8 for ; Mon, 23 Jun 2014 09:20:30 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 23 Jun 2014 09:17:19 +0200 Received: from 212-198-249-70.rev.numericable.fr (HELO ?192.9.200.158?) (mathieu.pujol@realfusio.com@212.198.249.70) by ns0.ovh.net with SMTP; 23 Jun 2014 09:17:17 +0200 Message-ID: <53A7D547.5080302@realfusio.com> Date: Mon, 23 Jun 2014 09:20:39 +0200 From: Pujol Mathieu User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: GIST optimization to limit calls to operator on sub nodes Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 15311394308501388337 X-Ovh-Remote: 212.198.249.70 (212-198-249-70.rev.numericable.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeejvddrleejucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeejvddrleejucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Hello, I already post my question in the General Mailing list, but without succeed so I try this one that seems to me more specialized. My question is about GIST index. I made my own index to handle specific data and operators. It works pretty fine but I wonder if it was possible to optimize it. When I run my operator on a GIST node (in the method gist_range_consistent) it returns "NotConsistent" / "MaybeConsistent" / "FullyConsistent". NotConsistent -> means that all subnodes could be ignored, gist_range_consistent return false MaybeConsistent -> means that at least one subnode/leaf will be consistent, gist_range_consistent return true FullyConsistent -> means that all subnodes/leaves will be consistent, gist_range_consistent return true So like with the "recheck flag" I would like to know if there is a way to notify postgres that it is not necessary to rerun my operator on subnodes, to speedup the search. For example, consider the following gist tree R / \ Na Nb / \ / \ La1 La2 Lb1 Lb2 If all nodes return FullyConsistent, postgres will run tests in that Order : R, Na, Nb, La1, La2, Lb1, Lb2, thanks to recheck flag it will not test rows associated to leaves Lxx. My goal is that postgres run test on R and then skip tests on other nodes. So is there a way to do that in the GIST API ? Or could I share data from R to Nx and then From Na to Lax and Nb to Lbx ? Thanks, Mathieu -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance