Re: Want records to be UNIQUE. When searching for dupes, stop onfirst matching record.

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Want records to be UNIQUE. When searching for dupes, stop onfirst matching record.
Дата
Msg-id CAH2-WznihtJ20uiCwwx2x-9ax3cpu3XZPhhs4S5xFAWp039RGw@mail.gmail.com
обсуждение исходный текст
Ответ на Want records to be UNIQUE. When searching for dupes, stop on firstmatching record.  (Pól Ua Laoínecháin <linehanp@tcd.ie>)
Ответы Re: Want records to be UNIQUE. When searching for dupes, stop onfirst matching record.  (Pól Ua Laoínecháin <linehanp@tcd.ie>)
Список pgsql-novice
On Thu, Apr 18, 2019 at 1:15 PM Pól Ua Laoínecháin <linehanp@tcd.ie> wrote:
> But what I really want (what I really, really want - apologies to the
> Spice Girls) to know is, is there a query which will run and stop on
> the first match? Using ANY, ALL or EXISTS or some construct like that?

It sounds like you're looking for a loose index scan:

https://wiki.postgresql.org/wiki/Loose_indexscan

Unfortunately, Postgres doesn't have this capability just yet, so
you'll have to simulate it in the manner described by the Wiki page.

--
Peter Geoghegan



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

Предыдущее
От: Pól Ua Laoínecháin
Дата:
Сообщение: Re: Want records to be UNIQUE. When searching for dupes, stop onfirst matching record.
Следующее
От: Pól Ua Laoínecháin
Дата:
Сообщение: Re: Want records to be UNIQUE. When searching for dupes, stop onfirst matching record.