Re: Tid scan improvements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Tid scan improvements
Дата
Msg-id 28822.1545411468@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Tid scan improvements  (Edmund Horner <ejrh00@gmail.com>)
Ответы Re: Tid scan improvements  (Edmund Horner <ejrh00@gmail.com>)
Список pgsql-hackers
Edmund Horner <ejrh00@gmail.com> writes:
> Ok.  I think that will simplify things.  So if I follow you correctly,
> we should do:

> 1. If has_useful_pathkeys is true: generate pathkeys (for CTID ASC),
> and use truncate_useless_pathkeys on them.
> 2. If we have tid quals or pathkeys, emit a TID scan path.

Check.

> For the (optional) backwards scan support patch, should we separately
> emit another path, in the reverse direction?

What indxpath.c does is, if has_useful_pathkeys is true, to generate
pathkeys both ways and then build paths if the pathkeys get past
truncate_useless_pathkeys.  That seems sufficient in this case too.
There are various heuristics about whether it's really useful to
consider both sort directions, but that intelligence is already
built into truncate_useless_pathkeys.  tid quals with no pathkeys
would be reason to generate a forward path, but not reason to
generate a reverse path, because then that would be duplicative.

            regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: A few new options for vacuumdb
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [suggestion]support UNICODE host variables in ECPG