| От | Tom Lane |
|---|---|
| Тема | Re: execute cursor fetch |
| Дата | |
| Msg-id | 1856.1097590076@sss.pgh.pa.us обсуждение |
| Ответ на | Re: execute cursor fetch (my ho <mthoatbanjo@yahoo.com>) |
| Список | pgsql-performance |
my ho <mthoatbanjo@yahoo.com> writes:
> If anyone can help pls, I have a question abt the
> execution of cursor create/fetch/move , in particular
> about disk cost. When a cursor is created, is the
> whole table (with the required columns) got put into
> memory?
No. The plan is set up and then incrementally executed each time you
say FETCH.
> how does postgre speed up the query in
> compare to normal selection?
The only difference from a SELECT is that the planner will prefer
"fast-start" plans, on the theory that you may not be intending
to retrieve the whole result. For instance it might prefer an
indexscan to a seqscan + sort, when it otherwise wouldn't.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера