Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh3cg-0003Wp-46 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2013 20:34:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vh3cf-00025x-EE for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2013 20:34:41 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh3ce-00025o-0Y for pgsql-hackers@postgresql.org; Thu, 14 Nov 2013 20:34:40 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh3cb-00063u-Cm for pgsql-hackers@postgresql.org; Thu, 14 Nov 2013 20:34:39 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 2F87B98AFA; Thu, 14 Nov 2013 12:34:35 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 2C1B240091; Thu, 14 Nov 2013 12:34:35 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id D8BE7C004D; Thu, 14 Nov 2013 12:34:51 -0800 (PST) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Thu, 14 Nov 2013 12:34:51 -0800 (PST) Message-ID: <528533D9.3040501@vmware.com> Date: Thu, 14 Nov 2013 22:34:33 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: Alexander Korotkov CC: pgsql-hackers Subject: Re: GIN improvements part2: fast scan References: <51BF0A90.2000503@vmware.com> <51C16235.3080308@vmware.com> <51C170A8.9060509@vmware.com> <51C4ACC5.2090707@vmware.com> <51D00FB6.9030008@vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -6.9 (------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 14.11.2013 19:26, Alexander Korotkov wrote: > On Sun, Jun 30, 2013 at 3:00 PM, Heikki Linnakangas > wrote: > >> On 28.06.2013 22:31, Alexander Korotkov wrote: >> >>> Now, I got the point of three state consistent: we can keep only one >>> consistent in opclasses that support new interface. exact true and exact >>> false values will be passed in the case of current patch consistent; exact >>> false and unknown will be passed in the case of current patch >>> preConsistent. That's reasonable. >>> >> >> I'm going to mark this as "returned with feedback". For the next version, >> I'd like to see the API changed per above. Also, I'd like us to do >> something about the tidbitmap overhead, as a separate patch before this, so >> that we can assess the actual benefit of this patch. And a new test case >> that demonstrates the I/O benefits. > > > Revised version of patch is attached. > Changes are so: > 1) Patch rebased against packed posting lists, not depends on additional > information now. > 2) New API with tri-state logic is introduced. Thanks! A couple of thoughts after a 5-minute glance: * documentation * How about defining the tri-state consistent function to also return a tri-state? True would mean that the tuple definitely matches, false means the tuple definitely does not match, and Unknown means it might match. Or does return value true with recheck==true have the same effect? If I understood the patch, right, returning Unknown or True wouldn't actually make any difference, but it's conceivable that we might come up with more optimizations in the future that could take advantage of that. For example, for a query like "foo OR (bar AND baz)", you could immediately return any tuples that match foo, and not bother scanning for bar and baz at all. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers