Re: libpq: How are result sets fetched behind the scene?
Вложения
В списке pgsql-sql по дате отправления:
| От | Christian Barthel |
|---|---|
| Тема | Re: libpq: How are result sets fetched behind the scene? |
| Дата | |
| Msg-id | 87zhjg8eep.fsf@x230.onfire.org обсуждение исходный текст |
| Ответ на | Re: libpq: How are result sets fetched behind the scene? (Sebastien FLAESCH <sf@4js.com>) |
| Ответы |
Re: libpq: How are result sets fetched behind the scene?
|
| Список | pgsql-sql |
Sebastien FLAESCH <sf@4js.com> writes: > Is the whole result set fetched to the client app, not matter what row > number is provided to the first PQgetvalue() call (or similar API call > on result set data or meta-data)? I have tested this as well and came to the same result as you. The entire result set seems to be fetched at once. Attached is a test program: I have loaded 30MB of random strings and did a simple SELECT on the random data. I stopped the output with getchar() and looked at the network traffic and the memory usage with top(1). Everything gets allocated and fetched at once as far as I can see. However, I would not build an application that "depends" on this behavior. I think that it is better to use a declared cursor and use FETCH. -- Christian Barthel <bch@online.de>
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера