problem when optimizing the window aggregation

Поиск
Список
Период
Сортировка
От Wang, Chaoyong
Тема problem when optimizing the window aggregation
Дата
Msg-id 95FA8B25DB5E2D4E889EB9BEB6A6406F3CADFF@CORPUSMX30B.corp.emc.com
обсуждение исходный текст
Ответы Re: problem when optimizing the window aggregation
Список pgsql-hackers
<div class="WordSection1"><p class="MsoNormal">Hi,<p class="MsoNormal"> <p class="MsoNormal"
style="text-indent:9.0pt">I’mtrying to reduce the re-computing of window aggregation. Here the AVG function for
example.<pclass="MsoNormal" style="text-indent:9.0pt"> <p class="MsoNormal" style="text-indent:9.0pt">The original
windowaggregation’s transition value(transValue) of AVG is an ArrayType, that contains two main values(sum, count). <p
class="MsoNormal"style="text-indent:9.0pt"> <p class="MsoNormal" style="text-indent:9.0pt">Now, I’m using a temporary
transitionvalue (tempTransValue), and I need to copy tempTransValue to transValue.<p class="MsoNormal"
style="text-indent:9.0pt"> <pclass="MsoNormal" style="text-indent:9.0pt">I used the function datumCopy as following:<p
class="MsoNormal"style="text-indent:36.0pt">peraggstate->transValue = datumCopy(peraggstate->tempTransValue,
peraggstate->transtypeByVal,peraggstate->transtypeLen);<p class="MsoNormal" style="text-indent:9.0pt"> <p
class="MsoNormal"style="text-indent:9.0pt">But when the copied transValue is passed to the invoke function, here is
int4_avg_accum,the ArrayType returned from PG_GETARG_ARRAYTYPE_P(0) is null.<p class="MsoNormal"
style="text-indent:9.0pt">Whichmeans the copy action is failed.<p class="MsoNormal" style="text-indent:9.0pt"> <p
class="MsoNormal"style="text-indent:9.0pt">Anybody know why? Or give me some suggestions? Thanks very much.<p
class="MsoNormal"style="text-indent:9.0pt"> <p class="MsoNormal" style="text-indent:9.0pt"> <p class="MsoNormal"
style="text-indent:9.0pt">BestRegards<p class="MsoNormal" style="text-indent:9.0pt">Chaoyong Wang<p
class="MsoNormal"> </div>

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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: multi-master pgbench?
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: multi-master pgbench?