Re: Fix for seg picksplit function
От | Yeb Havinga |
---|---|
Тема | Re: Fix for seg picksplit function |
Дата | |
Msg-id | 4CDAB4A9.6080801@gmail.com обсуждение исходный текст |
Ответ на | Re: Fix for seg picksplit function (Alexander Korotkov <aekorotkov@gmail.com>) |
Ответы |
Re: Fix for seg picksplit function
|
Список | pgsql-hackers |
On 2010-11-10 15:46, Alexander Korotkov wrote: <blockquote cite="mid:AANLkTimYb_zRhX3AP2u0+K8wJEf751YP9-iZ6GVN_Jm5@mail.gmail.com"type="cite"><div class="gmail_quote">On Wed, Nov 10,2010 at 5:37 PM, Yeb Havinga <span dir="ltr"><<a href="mailto:yebhavinga@gmail.com" moz-do-not-send="true">yebhavinga@gmail.com</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">They arenecessary and it is code untouched by this patch, and the same line occurs in other picksplit functions as well. The gbt_num_picksplitfunction shows that it can be avoided, by rewriting in the second loop</div><br /> *left++ = sortItems[i].index;<br/> into<br /> v->spl_left[v->spl_nleft] = sortItems[i].index<br /><br /> Even though this islonger code, I prefer this variant over the shorter one.<br /></blockquote><div class="gmail_quote">I can't understandthis point. How the way of spl_left and spl_right arrays filling is related with additional FirstOffsetNumber valueat the end of array, which is added by "*left = *right = FirstOffsetNumber;" line?</div></div></blockquote> You're right,they are not related. I'm no longer sure it is necessary, looking at gistUserPicksplit.<br /><br /> regards,<br />Yeb Havinga<br /><br />
В списке pgsql-hackers по дате отправления: