[ https://issues.apache.org/jira/browse/KAFKA-5285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16367673#comment-16367673 ]
Peter Davis commented on KAFKA-5285: ------------------------------------ Thank you Guozhang for looking into this. Good point Xavier; for my part, the serious issue was when using `ReadOnlySessionStore.fetch(from,to)` which I believe implies a minSuffix of 0. Anything would be better than the current behavior of querying the range [keyFrom, infinity], which loads not just a few extra sessions outside the timestamp range, but *half the entire database* :-) > Optimize upper / lower byte range for key range scan on windowed stores > ----------------------------------------------------------------------- > > Key: KAFKA-5285 > URL: https://issues.apache.org/jira/browse/KAFKA-5285 > Project: Kafka > Issue Type: Improvement > Components: streams > Reporter: Xavier Léauté > Assignee: Guozhang Wang > Priority: Major > Labels: performance > > The current implementation of {{WindowKeySchema}} / {{SessionKeySchema}} > {{upperRange}} and {{lowerRange}} does not make any assumptions with respect > to the other key bound (e.g. the upper byte bound does not depends on lower > key bound). > It should be possible to optimize the byte range somewhat further using the > information provided by the lower bound. > More specifically, by incorporating that information, we should be able to > eliminate the corresponding {{upperRangeFixedSize}} and > {{lowerRangeFixedSize}}, since the result should be the same if we implement > that optimization. -- This message was sent by Atlassian JIRA (v7.6.3#76005)