Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Дата
Msg-id CAFiTN-vcxzzZNFyPmYgF5-iNErcivDo-kes7LdL0KmfKZ0p3bA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  (Önder Kalacı <onderkalaci@gmail.com>)
Ответы Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Список pgsql-hackers
On Mon, Mar 6, 2023 at 2:38 PM Önder Kalacı <onderkalaci@gmail.com> wrote:
>
I was going through the thread and patch,  I noticed that in the
initial version, we were depending upon the planner to let it decide
whether index scan is cheaper or not and which index to pick.  But in
the latest patch if a useful index exists then we chose that without
comparing the cost of whether it is cheaper than sequential scan or
not.  Is my understanding correct?  What is the reason for the same,
one reason I could see while looking into the thread is that we can
not just decide once whether the index scan is cheaper or not because
that decision could change in the future but isn't that better than
never checking whether index scan is cheaper or not.  Because in some
cases where column selectivity is high like 80-90% then the index can
be very costly due to random page fetches.  So I think we could easily
produce regression in some cases, have we tested those cases?

Let me if I am missing something.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Deduplicate logicalrep_read_tuple()
Следующее
От: Jim Jones
Дата:
Сообщение: Re: [PATCH] Add CANONICAL option to xmlserialize