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

DaweiLiu commented on IOTDB-326:
--------------------------------

This has been implemented in the SeriesAggregateReader

> We need a random skip reader
> ----------------------------
>
>                 Key: IOTDB-326
>                 URL: https://issues.apache.org/jira/browse/IOTDB-326
>             Project: Apache IoTDB
>          Issue Type: New Feature
>            Reporter: DaweiLiu
>            Priority: Major
>
> On the current read method, the smallest read unit is page, which means that 
> after initializing a reader, I will read directly to the first available 
> pageheader, which is very time consuming when chunkmetadata or certain 
> aggregations are available.
> Therefore, I think we should design a random read mode so that chunkmeta can 
> filter the chunks directly when using it, thus saving time.
> Here's an example:
> {code:java}
> while (hasNextChunk()) {
>   if ( can skip this chunk) {
>     continue;
>   } else {
>     chunk = readChunk();
>     while (chunk.hasNextPage) {
>       if (can skip this page) {
>         continue;
>       } else {
>         page = readPage();
>       }
>     }
>   }
> }{code}



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

Reply via email to