[ 
https://issues.apache.org/jira/browse/IGNITE-17855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17615731#comment-17615731
 ] 

Roman Puchkovskiy commented on IGNITE-17855:
--------------------------------------------

The patch looks good to me

> Implement inline size calculation for B+tree
> --------------------------------------------
>
>                 Key: IGNITE-17855
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17855
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Kirill Tkalenko
>            Assignee: Kirill Tkalenko
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-alpha6
>
>          Time Spent: 7h 50m
>  Remaining Estimate: 0h
>
> It is necessary to implement an efficient inline size calculation for indexes.
> Since the indexes will be stored in the *BplusTree*, we need to take into 
> account that they will be stored in the *BplusInnerIo* and *BplusLeafIo*, so 
> we need to calculate the effective (in the general case) size of item for 
> storing indexes.
> To calculate the size of an element, we need to take into account:
> * Minimum number of items in a *BplusInnerIo* must be 2;
> * Size of the entire tuple (index columns) must not exceed 2 KB;
> ** Class size is 2 bytes to cover most cases;
> ** If the user has not set a limit for variable length columns, then consider 
> it 10 bytes; 
> * If there are columns of variable length and we still have space in the 
> *BplusInnerIo* and *BplusLeafIo*, then we can increase the size of the item 
> without compromising the leaf (i.e. do not decrease the number of items in 
> it).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to