Re: Explain buffers display units.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Explain buffers display units.
Дата
Msg-id 603c8f071002151005y2d6f8d41qc6f6644bfd9e5040@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Explain buffers display units.  (Greg Stark <stark@mit.edu>)
Ответы Re: Explain buffers display units.  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
On Mon, Feb 15, 2010 at 9:55 AM, Greg Stark <stark@mit.edu> wrote:
> On Mon, Feb 15, 2010 at 2:22 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>> a) Changed the line description to "Total Buffer Usage" which at least
>>> hints that it's something more akin to the "Total runtime" listed at
>>> the bottom than the "actual time".
>>>
>>> b) Used units of memory -- I formatted them with 3 significant digits
>>> (unless the unit is bytes or kB where that would be silly). It's just
>>> what looked best to my eye.
>>
>> I wasn't aware we had consensus on making this change, which I see you
>> committed less than an hour after posting this.
>
> Well there was a 30+ message thread almost a week ago where there
> seemed to be some contention over the issue of whether the numbers
> should be averages or totals. But were there was no dispute over the
> idea of printing in memory units instead of blocks.

Hmm.... yeah, I guess it wasn't discussed.  I'm still not sure it's an
improvement.  If a query hit one buffer, is that really the same as
saying it hit 8kB?  To me, buffers seem like discrete (and unitless)
entities, and we handle them that way elsewhere in the system (see,
e.g. pg_stat_database, pg_statio_all_tables).  I don't know that it's
a good idea to display that same information here in a different
format.

> We can always continue tweak the details of the format such as adding
> spaces before the units to make it similar to the pg_size_pretty().
> I'm not sure I like the idea of making it exactly equivalent because
> pg_size_pretty() doesn't print any decimals so it's pretty imprecise
> for smaller values.

I definitely do not want to do anything that loses accuracy.  This is
probably accurate enough for most uses, but it's still not as accurate
as just printing the raw numbers.

...Robert


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Explain buffers display units.
Следующее
От: Gabriele Bartolini
Дата:
Сообщение: Re: psycopg2 license changed