Re: Fix for seg picksplit function - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Fix for seg picksplit function
Date
Msg-id AANLkTimYb_zRhX3AP2u0+K8wJEf751YP9-iZ6GVN_Jm5@mail.gmail.com
Whole thread Raw
In response to Re: Fix for seg picksplit function  (Yeb Havinga <yebhavinga@gmail.com>)
Responses Re: Fix for seg picksplit function
List pgsql-hackers
<div class="gmail_quote">On Wed, Nov 10, 2010 at 5:37 PM, Yeb Havinga <span dir="ltr"><<a
href="mailto:yebhavinga@gmail.com">yebhavinga@gmail.com</a>></span>wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">They are necessary and it is code
untouchedby this patch, and the same line occurs in other picksplit functions as well. The gbt_num_picksplit function
showsthat 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 is longer code, I prefer this variant
overthe shorter one.<br /></blockquote><div class="gmail_quote">I can't understand this point. How the way of spl_left
and spl_right arraysfilling is related with additional FirstOffsetNumber value at the end of array, which is added by
"*left= *right = FirstOffsetNumber;" line?</div><div class="gmail_quote"><br /></div>----<br />With best regards,<br
/>AlexanderKorotkov. </div> 

pgsql-hackers by date:

Previous
From: Yeb Havinga
Date:
Subject: Re: Fix for seg picksplit function
Next
From: Yeb Havinga
Date:
Subject: Re: Fix for seg picksplit function