Re: [HACKERS] Faster methods for getting SPI results

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] Faster methods for getting SPI results
Дата
Msg-id 7249067c-82a9-5807-abed-ffd95c812d7c@2ndquadrant.com
обсуждение исходный текст
Ответ на [HACKERS] Faster methods for getting SPI results  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: [HACKERS] Faster methods for getting SPI results  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Re: [HACKERS] Faster methods for getting SPI results  (Jim Nasby <jim.nasby@openscg.com>)
Список pgsql-hackers
On 12/20/16 23:14, Jim Nasby wrote:
> I've been looking at the performance of SPI calls within plpython. 
> There's a roughly 1.5x difference from equivalent python code just in 
> pulling data out of the SPI tuplestore. Some of that is due to an 
> inefficiency in how plpython is creating result dictionaries, but fixing 
> that is ultimately a dead-end: if you're dealing with a lot of results 
> in python, you want a tuple of arrays, not an array of tuples.

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.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: David Steele
Дата:
Сообщение: Re: [HACKERS] Speedup twophase transactions
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Backport of pg_statistics typos fix