Re: Function array_agg(array)

Поиск
Список
Период
Сортировка
От Ali Akbar
Тема Re: Function array_agg(array)
Дата
Msg-id CACQjQLrhBsrTPReZMNt5SPJz8P2sWHDsWbi0NzkCmv-_x4B2xg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Function array_agg(array)  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Function array_agg(array)
Список pgsql-hackers
you can check it? We can test, how performance lost we get. As second benefit we can get numbers for introduction new optimized array builder

array_agg(anyarray) with deconstruct_array, unchanged accumArrayResult and makeMdArrayResult:
INSERT 0 1
Time: 852,527 ms
INSERT 0 1
Time: 844,275 ms
INSERT 0 1
Time: 858,855 ms
INSERT 0 1
Time: 861,072 ms
INSERT 0 1
Time: 952,006 ms
INSERT 0 1
Time: 953,918 ms
INSERT 0 1
Time: 926,945 ms
INSERT 0 1
Time: 923,692 ms
INSERT 0 1
Time: 940,916 ms
INSERT 0 1
Time: 948,700 ms
INSERT 0 1
Time: 933,333 ms
INSERT 0 1
Time: 948,869 ms
INSERT 0 1
Time: 847,113 ms
INSERT 0 1
Time: 908,572 ms 
 
Total: 12776.83
Avg: 912,63

with last patch (v10):
INSERT 0 1
Time: 643,339 ms
INSERT 0 1
Time: 608,010 ms
INSERT 0 1
Time: 610,465 ms
INSERT 0 1
Time: 613,931 ms
INSERT 0 1
Time: 616,466 ms
INSERT 0 1
Time: 634,754 ms
INSERT 0 1
Time: 683,566 ms
INSERT 0 1
Time: 656,665 ms
INSERT 0 1
Time: 630,096 ms
INSERT 0 1
Time: 607,564 ms
INSERT 0 1
Time: 610,353 ms
INSERT 0 1
Time: 626,816 ms
INSERT 0 1
Time: 610,450 ms
INSERT 0 1
Time: 614,342 ms
 
Total: 8842,7
Avg: 631,6

It's 30% faster (i tried varlena element - text). I tried several times and it's consistent in +/- 30%.


quick & dirty non-optimized patch and the test script attached.

Regards,
--
Ali Akbar
Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Getting rid of "accept incoming network connections" prompts on OS X
Следующее
От: Andreas Karlsson
Дата:
Сообщение: [WIP Patch] Using 128-bit integers for sum, avg and statistics aggregates