Re: ToDo: KNN Search should to support DISTINCT clasuse?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: ToDo: KNN Search should to support DISTINCT clasuse?
Дата
Msg-id CA+TgmoaOPohnaZSREZKHYBitE0_4eX2NZduGQGRHyxnNq2AL8Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ToDo: KNN Search should to support DISTINCT clasuse?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ToDo: KNN Search should to support DISTINCT clasuse?
Список pgsql-hackers
On Mon, Oct 22, 2012 at 11:57 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> but using DISTINCT breaks KNN searching optimization
>
>> postgres=# explain select distinct nazobce, nazobce <-> 'Benešov' from
>> obce order by nazobce <-> 'Benešov' limit 10
>
> Don't hold your breath.  There are two ways the system could implement
> the DISTINCT clause: either sort and uniq, or hashaggregate.
> hashaggregate will destroy any input ordering, so there's no value in
> using the index as input.

Isn't that an implementation limitation though, rather than a
fundamental limitation?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Database object names and libpq in UTF-8 locale on Windows
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [v9.3] Row-Level Security