Cube extension kNN support
От | Stas Kelvich |
---|---|
Тема | Cube extension kNN support |
Дата | |
Msg-id | 9E07E159-E405-41E2-9889-A04F534FC257@gmail.com обсуждение исходный текст |
Ответы |
Re: Cube extension kNN support
Re: Cube extension kNN support high-dimensional knn-GIST tests (was Re: Cube extension kNN support) Re: Cube extension kNN support |
Список | pgsql-hackers |
Hello, hackers. Here is the patch that introduces kNN search for cubes with euclidean, taxicab and chebyshev distances. Following distance operators introduced: <#> taxicab distance <-> euclidean distance <=> chebyshev distance For example: SELECT * FROM objects ORDER BY objects.coord <-> '(137,42,314)'::cube LIMIT 10; Also there is operator "->" for selecting ordered rows directly from index. This request selects rows ordered ascending by 3rd coordinate: SELECT * FROM objects ORDER BY objects.coord->3 LIMIT 10; For descendent ordering suggested syntax with minus before coordinate. This request selects rows ordered descending by 4th coordinate: SELECT * FROM objects ORDER BY objects.coord->-4 LIMIT 10; Stas Kelvich.
Вложения
В списке pgsql-hackers по дате отправления: