Re: Manipulating complex types as non-contiguous structures in-memory
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Manipulating complex types as non-contiguous structures in-memory |
| Дата | |
| Msg-id | 15959.1431306554@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Manipulating complex types as non-contiguous structures in-memory (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: Manipulating complex types as non-contiguous
structures in-memory
|
| Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes:
> I'm not sure what exactly to use as a performance benchmark
> here. For now I chose
> SELECT * FROM (SELECT ARRAY(SELECT generate_series(1, 10000))) d, generate_series(1, 1000) repeat(i);
> that'll hit array_out, which uses iterators.
Hmm, probably those results are swamped by I/O functions though.
I'd suggest trying something that exercises array_map(), which
it looks like means doing an array coercion. Perhaps like so:
do $$
declare a int4[];
x int;
begin a := array(select generate_series(1,1000)); for i in 1..100000 loop x := array_length(a::int8[], 1); end loop;
end$$;
Anyway, thanks for poking at it!
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера