Re: Function array_agg(array)
От | Pavel Stehule |
---|---|
Тема | Re: Function array_agg(array) |
Дата | |
Msg-id | CAFj8pRBMKP3c9eU42J3nKmiNRHOP2+PAvpDO1gqdQThO0PF+Yg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Function array_agg(array) (Ali Akbar <the.apaan@gmail.com>) |
Ответы |
Re: Function array_agg(array)
|
Список | pgsql-hackers |
Hi
My idea is using new ArrayBuilder optimized for building multidimensional arrays with own State type. I think so casting to ArrayBuildState is base of our problems, so I don't would to do. Code in array_agg_* is simple, little bit more complex code is in nodeSubplan.c. Some schematic changes are in attachments.Pavel
2014-10-25 15:58 GMT+02:00 Ali Akbar <the.apaan@gmail.com>:
you can check it? We can test, how performance lost we get. As second benefit we can get numbers for introduction new optimized array builderarray_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 msTotal: 12776.83Avg: 912,63with 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 msTotal: 8842,7
Avg: 631,6It'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 по дате отправления: