Re: LibPQ: PQresultMemorySize as proxy to transfered bytes
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: LibPQ: PQresultMemorySize as proxy to transfered bytes |
| Дата | |
| Msg-id | 1140652.1687950987@sss.pgh.pa.us обсуждение |
| Ответ на | LibPQ: PQresultMemorySize as proxy to transfered bytes (Dominique Devienne <ddevienne@gmail.com>) |
| Ответы |
Re: LibPQ: PQresultMemorySize as proxy to transfered bytes
|
| Список | pgsql-general |
Dominique Devienne <ddevienne@gmail.com> writes:
> Obviously from these results, I now realize PQresultMemorySize() returns
> something larger than what went across the network. Can someone explain
> how so?
That number is the total space actually requested from malloc() for
the PGresult object. But we request space in blocks (typically 2KB
each), so there's some overhead due to fields not exactly filling
a block, unused space in the last block, etc. If you're testing
with very small result sets (say a couple hundred KB) then the
value could be pretty far off what went across the network.
A larger result set should show less percentage error.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера