Re: Using unique btree indexes for pathkeys with one extra column
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Using unique btree indexes for pathkeys with one extra column |
| Дата | |
| Msg-id | 32730.1563234739@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Using unique btree indexes for pathkeys with one extra column (Thomas Munro <thomas.munro@gmail.com>) |
| Список | pgsql-hackers |
Thomas Munro <thomas.munro@gmail.com> writes:
> In the category "doing more tricks with our existing btrees", which
> includes all that difficult stuff like skip scans and incremental
> sort, here's an easier planner-only one: if you have a unique index
> on (a) possibly "including" (b) and you have a pathkey (a, b), you can
> use an index [only] scan. That is, if the index is unique, and you
> want exactly one extra column in index order, then you don't need any
> extra sorting to get (a, b) in order. (If the index is not unique, or
> there is more than one extra trailing column in the pathkey, you need
> the incremental sort patch[1] to use this index).
Seems like you also have to insist that a is NOT NULL.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера