Re: Query optimiser is not using 'not null' constraint when 'order bynulls last' clause is used

Поиск
Список
Период
Сортировка
От Nandakumar M
Тема Re: Query optimiser is not using 'not null' constraint when 'order bynulls last' clause is used
Дата
Msg-id CANcFUu7o+xcppnDyjf64+BgmjjzT6me_G5spqAOwipU6hUNdvg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query optimiser is not using 'not null' constraint when 'order bynulls last' clause is used  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-performance
Hi,

On Fri, Feb 2, 2018 at 9:28 PM, David G. Johnston
<david.g.johnston@gmail.com> wrote:

> You probably can (I assume the nulls aspect of the index doesn't prevent PK
> usage), but you must add the PK to the table after creating the index and
> not let the system auto-generate the index for you.
>
> https://www.postgresql.org/docs/10/static/sql-altertable.html
>
> ALTER TABLE name ADD PRIMARY KEY USING INDEX index_name;
>

I missed to notice this in the docs. Thank you David for pointing it out.

Regards,
Nanda


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Query optimiser is not using 'not null' constraint when 'order bynulls last' clause is used
Следующее
От: Vitaliy Garnashevich
Дата:
Сообщение: Re: effective_io_concurrency on EBS/gp2