Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X1LkA-0002CH-Sr for pgsql-performance@arkaria.postgresql.org; Sun, 29 Jun 2014 20:30:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X1LkA-0003vU-8b for pgsql-performance@arkaria.postgresql.org; Sun, 29 Jun 2014 20:30: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 1X1Lk8-0003vI-6G for pgsql-performance@postgresql.org; Sun, 29 Jun 2014 20:30:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X1Lk0-0007Kz-T9 for pgsql-performance@postgresql.org; Sun, 29 Jun 2014 20:30:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s5TKUM9a004114; Sun, 29 Jun 2014 16:30:22 -0400 From: Tom Lane To: Emre Hasegeli cc: Pujol Mathieu , PostgreSQL Performance Subject: Re: GIST optimization to limit calls to operator on sub nodes In-reply-to: <20140629201419.GA63570@hasegeli.local> References: <53A7D547.5080302@realfusio.com> <20140629201419.GA63570@hasegeli.local> Comments: In-reply-to Emre Hasegeli message dated "Sun, 29 Jun 2014 23:14:19 +0300" Date: Sun, 29 Jun 2014 16:30:22 -0400 Message-ID: <4113.1404073822@sss.pgh.pa.us> 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 Emre Hasegeli writes: > Pujol Mathieu : >> 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. > I do not think it is possible at the moment. The GiST framework can > be extended to support this use case. I am not sure about the > speedup. Most of the consistent functions do not seem very expensive > compared to other operations of the GiST framework. I would be > happy to test it, if you would implement. I don't actually understand what's being requested here that the NotConsistent case doesn't already cover. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance