Re: [PATCH] kNN for btree

From: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] kNN for btree
Date: 2019-02-20 01:18:56
Message-ID: b8f5294c-b99a-9bb2-eeca-0a04d8b0a3a3@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04.02.2019 8:35, Michael Paquier wrote:
> This patch set needs a rebase because of conflicts caused by the
> recent patches for pluggable storage.

Attached 6th version of the patches rebased onto current master:

* index_clauses now also passed into ammatchorderby()

* added support for queries like
SELECT * FROM tab WHERE col1 = val1 AND col2 = val2 ORDER BY col3 <-> val3

* (experimental patch #9)
added support for queries like
SELECT * FROM tab WHERE col1 IN (v1, v2, v3) ORDER BY col1, col2 <-> val

Patch #9 is experimental. In order to distinguish order-by-operator and
simple order-by-column clauses (index column can be operator expression)
in orderbyclauses lists I am trying to pass negative column numbers in
orderbyclausecols, but it looks ugly, so I think orderbyclauses passing needs
some refactoring like recent IndexClause refactoring. Also I doubt that I
correctly implemented match_pathkey_to_indexcol().

--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
0001-Fix-get_index_column_opclass-v06.patch text/x-patch 1.2 KB
0002-Introduce-ammatchorderby-function-v06.patch text/x-patch 21.5 KB
0003-Extract-structure-BTScanState-v06.patch text/x-patch 43.5 KB
0004-Add-kNN-support-to-btree-v06.patch text/x-patch 65.2 KB
0005-Add-btree-distance-operators-v06.patch text/x-patch 79.0 KB
0006-Remove-distance-operators-from-btree_gist-v06.patch text/x-patch 100.7 KB
0007-Add-regression-tests-for-kNN-btree-v06.patch text/x-patch 42.8 KB
0008-Allow-ammatchorderby-to-return-pathkey-sublists-v06.patch text/x-patch 1.9 KB
0009-Add-support-of-array-ops-to-btree-kNN-v06.patch text/x-patch 27.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Takahashi, Ryohei 2019-02-20 01:53:22 RE: SQL statement PREPARE does not work in ECPG
Previous Message Peter Geoghegan 2019-02-20 00:48:16 Re: CPU costs of random_zipfian in pgbench