Re: pgsql: CREATE INDEX ... INCLUDING (column[, ...])

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: CREATE INDEX ... INCLUDING (column[, ...])
Дата
Msg-id 26649.1460143335@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: CREATE INDEX ... INCLUDING (column[, ...])  (Anastasia Lubennikova <a.lubennikova@postgrespro.ru>)
Список pgsql-committers
Anastasia Lubennikova <a.lubennikova@postgrespro.ru> writes:
> The answer to the question about expressions is quite simple - they are not
> supported by index-only scan, so having them in covering index now is just
> wasting of disc space.

Well, it's true that the planner can't handle them easily in IOS, but
your claim that that makes them useless is exactly backwards.  As an
example, consider an index on x with f(x) as an extra column.  The
planner *could* make use of f(x), at least in simple cases, because
the presence of x would bypass the lack of intelligence in
check_index_only().

In any case, work is afoot to fix that planner restriction, so I do
not think we should add features that expect it to be a permanent
part of the landscape.

            regards, tom lane


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: pgsql: In dumpTable, re-instate the skipping logic
Следующее
От: Kevin Grittner
Дата:
Сообщение: pgsql: Modify BufferGetPage() to prepare for "snapshot too old" feature