Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ysc8o-0007OK-23 for pgsql-hackers@arkaria.postgresql.org; Wed, 13 May 2015 19:16:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ysc8m-00009s-Fc for pgsql-hackers@arkaria.postgresql.org; Wed, 13 May 2015 19:16:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ysc8l-00009l-7Y for pgsql-hackers@postgresql.org; Wed, 13 May 2015 19:16:23 +0000 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Ysc8h-000413-84 for pgsql-hackers@postgresql.org; Wed, 13 May 2015 19:16:22 +0000 Received: by widdi4 with SMTP id di4so211935963wid.0 for ; Wed, 13 May 2015 12:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=W6aUuMfGhMtYK+x5aqxJHPn50b07lXUxLAaA+0TTDto=; b=DPqmNZ6F1Bt933tNducUpdHnQQ0nGRuJwvASxlCBI5A9eGhqhN3EJVzYt76P2KuR11 9TXpADBpHuYPJL26P5RUisQv8MyHTC8utiQpzWiNKvXdG7TMaqEg4/gyDMWjFZmjHZcc O8+kizvdEzG65fI45j4iNNsXd2oZ34BsDOwJNZZ0TR94n3BsY6MqGeUJKtvN4zrXOVBh ffjOVK8uZxfZG9/fBMcMqQvvPdug3JIH8CjBTtwonFg93y/5sV/7VMDaN9EBuPJnfmg1 tsuEEv6wlt4YfjJvxUAgsv+m+VEVKug/5189vXf2/QR6OLhg6Nipsu5iFrDe9B2PaD2R qdqw== X-Received: by 10.180.85.42 with SMTP id e10mr41228234wiz.17.1431544578251; Wed, 13 May 2015 12:16:18 -0700 (PDT) Received: from [192.168.1.99] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by mx.google.com with ESMTPSA id xy5sm34382057wjc.35.2015.05.13.12.16.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2015 12:16:17 -0700 (PDT) Message-ID: <5553A2FF.1030501@iki.fi> Date: Wed, 13 May 2015 22:16:15 +0300 From: Heikki Linnakangas Reply-To: hlinnaka@iki.fi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Alexander Korotkov , Tomas Vondra , Heikki Linnakangas CC: pgsql-hackers Subject: Re: KNN-GiST with recheck References: <20140803134809.GA58181@hasegeli-2.local> <20140914180936.GA5084@hasegeli.com> <20140926011800.GA8130@momjian.us> <20140929021631.GG12447@momjian.us> <20141006093609.GA12899@hasegeli.com> <5490357C.8090800@vmware.com> <54EC8D3E.2000908@2ndquadrant.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 04/17/2015 12:05 PM, Alexander Korotkov wrote: > On Wed, Feb 25, 2015 at 12:15 PM, Alexander Korotkov > wrote: > >> Hi! >> >> On Tue, Feb 24, 2015 at 5:39 PM, Tomas Vondra < >> tomas.vondra@2ndquadrant.com> wrote: >> >>> On 17.2.2015 14:21, Alexander Korotkov wrote: >>>> On Sun, Feb 15, 2015 at 2:08 PM, Alexander Korotkov >>>> > wrote: >>>> >>>> Revised patch with reordering in GiST is attached >>>> (knn-gist-recheck-in-gist.patch) as well as testing script (test.py). >>> >>> I meant to do a bit of testing on this (assuming it's still needed), but >>> the patches need rebasing - Heikki fixed a few issues, so they don't >>> apply cleanly. >>> >> >> Both patches are revised. >> > > Both patches are rebased against current master. This looks pretty much ready. I'm going to spend some time on this on Friday, and if all looks good, commit. (Thursday's a public holiday here). One quick comment: It would be good to avoid the extra comparisons of the distances, when the index doesn't return any lossy items. As the patch stands, it adds one extra copyDistances() call and a cmp_distances() call for each tuple (in a knn-search), even if there are no lossy tuples. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers