Re: PostgreSQL Choosing Full Index Over Partial Index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL Choosing Full Index Over Partial Index
Дата
Msg-id 1287724.1746022444@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PostgreSQL Choosing Full Index Over Partial Index  (Felipe López Montes <xocas89@gmail.com>)
Список pgsql-performance
=?UTF-8?Q?Felipe_L=C3=B3pez_Montes?= <xocas89@gmail.com> writes:
> Thanks a lot for your response Tom.
> May I ask how do you debug those functions?
> Or is it just that you read the code and more or less guess what should be
> the value for each variable with information coming from querying Postgres
> tables?

The guessing was in building a test case, since you didn't provide
a self-contained reproducer...

Once I had a case where the estimated cost was smaller for the larger
index, I just worked through the code to see where the costs diverged.
It helped that I already know the structure of that code well, but
there wasn't guesswork involved, other than where to set breakpoints
to narrow down the source more quickly.

I forgot to mention on this thread that I posted a possible fix at
[1].

            regards, tom lane

[1] https://www.postgresql.org/message-id/870686.1745860834%40sss.pgh.pa.us



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