You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by John Wilson <sa...@gmail.com> on 2018/07/26 00:07:49 UTC

Quick questions on B+ Trees and Partitions

Hi,


   1. B+ tree initialization, BPlusTree.initTree, seems to be called for
   every partition. Why?
   https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java
   2. The documentation here,
   https://apacheignite.readme.io/docs/memory-architecture, also states
   that for each SQL index, Ignite instantiates and manages a dedicated B+
   Tree. So, is the number of B+ trees determined by partition number of # of
   indexes defined?
   3. Assume I have a Person cache and an Organization cache. How many B+
   trees are defined for each cache
   4. What differentiates one B+ tree from another B+ tree? Just the cache
   it represents?


Thanks,
John

Re: Quick questions on B+ Trees and Partitions

Posted by Dmitriy Govorukhin <dm...@gmail.com>.
Hi John,

1. B + tree in a partition is a primary key index, this means that we use a
B+ tree index for searching data in the partition.
2. Not fully understood a question, please explain more details.
3. It depends how many partitions do you have for these caches, by default
it 1024 per cache, in your default case it will be 2048 B+ trees.
4. if I understood your question correctly, what differentiates between B+
tree in a partition and B+ tree in SQL index?
SQL B+ tree is one (or as much as you created indexes) per cache on Node
(value field index), partition B+ tree (primary key index) as many as many
partitions.

On Thu, Jul 26, 2018 at 3:07 AM John Wilson <sa...@gmail.com> wrote:

> Hi,
>
>
>    1. B+ tree initialization, BPlusTree.initTree, seems to be called for
>    every partition. Why?
>
> https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java
>    2. The documentation here,
>    https://apacheignite.readme.io/docs/memory-architecture, also states
>    that for each SQL index, Ignite instantiates and manages a dedicated B+
>    Tree. So, is the number of B+ trees determined by partition number of #
> of
>    indexes defined?
>    3. Assume I have a Person cache and an Organization cache. How many B+
>    trees are defined for each cache
>    4. What differentiates one B+ tree from another B+ tree? Just the cache
>    it represents?
>
>
> Thanks,
> John
>