Re: Fix gin index cost estimation

Поиск
Список
Период
Сортировка
От Ronan Dunklau
Тема Re: Fix gin index cost estimation
Дата
Msg-id 13151261.uLZWGnKmhe@aivenlaptop
обсуждение исходный текст
Ответ на Re: Fix gin index cost estimation  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Fix gin index cost estimation  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
Le mardi 25 octobre 2022, 16:18:57 CET Tom Lane a écrit :
> Alexander Korotkov <aekorotkov@gmail.com> writes:
> > I think Tom's point was that it's wrong to add a separate entry-tree CPU
> > cost estimation to another estimation, which tries (very inadequately) to
> > estimate the whole scan cost. Instead, I propose writing better
> > estimations
> > for both entry-tree CPU cost and data-trees CPU cost and replacing
> > existing
> > CPU estimation altogether.
>
> Great idea, if someone is willing to do it ...
>
>             regards, tom lane

Hello,

Sorry for the delay, but here is an updated patch which changes the costing in
the following way:

- add a descent cost similar to the btree one is charged for the initial
entry-tree
- additionally, a charge is applied per page in both the entry tree and
posting trees / lists
- instead of charging the quals to each tuple, charge them per entry only. We
still charge cpu_index_tuple_cost per tuple though.

With those changes, no need to tweak the magic number formula estimating the
number of pages. Maybe we can come up with something better for estimating
those later on ?

Best regards,

--
Ronan Dunklau

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: ExecRTCheckPerms() and many prunable partitions
Следующее
От: Amit Langote
Дата:
Сообщение: Re: generic plans and "initial" pruning