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

Zesong Sun commented on IOTDB-605:
----------------------------------

Here is the *final design*:

* Each node is consisted of *MetadataIndexEntry* list: [<device / measurement 
name, offset, childNodeType>, ... ] and an *endOffset*. These elements 
represent the children nodes of the internal node.
* The field childNodeType is an enum value, which represents the type of the 
next child node.
* The degree of node *maxDegreeOfIndexNode* could be configured by users. (In 
the examples, I set maxDegreeOfIndexNode = 10 for convenience, and default 
value = 1024)
* The storage process is from bottom to up. Whenever the blocks >= 
maxDegreeOfIndexNode, a parent level index will be generated and will be 
insisted into disk.
* The query process is from top to bottom with binary search of the array.

> Add more levels of index in TsFileMetadata
> ------------------------------------------
>
>                 Key: IOTDB-605
>                 URL: https://issues.apache.org/jira/browse/IOTDB-605
>             Project: Apache IoTDB
>          Issue Type: Improvement
>            Reporter: Zesong Sun
>            Assignee: Zesong Sun
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.10.0-SNAPSHOT
>
>         Attachments: Examples.png, Structure of MetadataIndex levels.png
>
>
> Facing a scenario that one device has 300k measurements, when we read one 
> time series in a TsFile, we need to deserialize 300k TimeseriesMetadata, 
> which costs about 250ms (just for reading metadata of one tsfile). This may 
> cause the query much slow.
> As this scenario is not rare, I think this should be optimized by adding more 
> indexes in TsFileMetadata.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to