Re: Preliminary patch for on-the-fly relpages/reltuples estimation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Preliminary patch for on-the-fly relpages/reltuples estimation
Дата
Msg-id 1368.1102346019@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Preliminary patch for on-the-fly relpages/reltuples  (Markus Bertheau <twanger@bluetwanger.de>)
Список pgsql-patches
Markus Bertheau <twanger@bluetwanger.de> writes:
>> +     num_tuples = ceil(num_tuples + tuples_removed * 0.5);

> Not understanding a thing about the PG source code, and judging from the
> variable names, wouldn't you want ceil(num_tuples + (num_tuples -
> tuples_removed) * 0.5) instead?

No.  num_tuples is post-removal.  The full expression is
    (num_tuples + (num_tuples + tuples_removed)) / 2
which simplifies as above.

            regards, tom lane

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

Предыдущее
От: Markus Bertheau
Дата:
Сообщение: Re: Preliminary patch for on-the-fly relpages/reltuples
Следующее
От: "Korea PostgreSQL Users' Group"
Дата:
Сообщение: Re: patch contrib/pgcrypto for win32 (2) - bug report