Re: [HACKERS] Faster methods for getting SPI results
От | Peter Eisentraut |
---|---|
Тема | Re: [HACKERS] Faster methods for getting SPI results |
Дата | |
Msg-id | 98da4d04-796a-fad7-474d-79c7a9808d24@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Faster methods for getting SPI results (Jim Nasby <jim.nasby@openscg.com>) |
Список | pgsql-hackers |
On 3/5/17 16:07, Jim Nasby wrote: >> There is nothing that requires us to materialize the results into an >> actual list of actual rows. We could wrap the SPI_tuptable into a >> Python object and implement __getitem__ or __iter__ to emulate sequence >> or mapping access. > Would it be possible to have that just pull tuples directly from the > executor? The overhead of populating the tuplestore just to drain it > again can become quite significant, and AFAICT it's completely unnecessary. I think there are many options, depending on what you want. If you want to materialize the result, then you have to materialize it somewhere, and then make a Python object around that. Or you could make an iterator interface that just reads a tuple at a time. Or maybe there are other options. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: