Re: knngist - 0.8

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: knngist - 0.8
Дата
Msg-id 4CC16E50.90104@sigaev.ru
обсуждение исходный текст
Ответ на Re: knngist - 0.8  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: knngist - 0.8  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
> You can define the additional argument as providing all of the extra
> info about how the operator is being used, and, if it's being used for
> ordering, the details of the requested order.  What is your thinking
> on the matter?

Maby be useful, but it seems to me to be a bit overengineering for now. GiST 
will not support knn-search with different than ASC NULLS LAST order in foresee 
future, because it stores NULLs in unmaintainable manner for different ordering: 
NULLs could be everywhere in tree. So, implementation of ASC NULLS FIRST 
requires to read whole tree to find all NULLs value first. I can imagine, how to 
reorganize tree to store NULLs together for single-column index, but not for 
multi-column index. Orders DESC NULLS LAST/FIRST requires to introduce two more 
"infinite" values: one to notion of distance more than +INF and another, 
non-negative, but less than zero distance.

Again, it could be useful for modification of GiST known as ordered GiST. But 
ordered GiST uses completely different tree traversal algorithm for search and 
insert, and it hasn't any benefits comparing with B-Tree and GiST. It's looks 
like an autogiro which successfully combines disadvantages of airplanes and 
helicopters :)
-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: gist DatumGetPointer returns pointer to corrupted data
Следующее
От: Leonardo Francalanci
Дата:
Сообщение: Custom aggragation function that creates an array