[
https://issues.apache.org/jira/browse/OAK-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13897731#comment-13897731
]
Davide Giannella commented on OAK-1263:
---------------------------------------
I'm currently working on a prototype that can be found on my [github
fork|https://github.com/davidegiannella/jackrabbit-oak/tree/OAK-1263]. It works
by the extensions of the current PropertyIndex.
Is currently implementing a single LinkedList approach with the aim of optimise
it later on into a [skiplist|http://en.wikipedia.org/wiki/Skip_list].
There are benchmarks too for measuring the throughput of inserts (for now) and
comparing the three use-cases: [no
index|https://github.com/davidegiannella/jackrabbit-oak/blob/OAK-1263/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/NoIndexesOrderByInsertTest.java],
[standard
property|https://github.com/davidegiannella/jackrabbit-oak/blob/OAK-1263/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/StandardPropertyIndexOrderByInsertTest.java]
and [ordered
property|https://github.com/davidegiannella/jackrabbit-oak/blob/OAK-1263/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/OrderedPropertyIndexOrderByInsertTest.java].
> optimize oak index to support 'fast ORDER BY' queries to support sorting &
> pagination for large set of children
> ---------------------------------------------------------------------------------------------------------------
>
> Key: OAK-1263
> URL: https://issues.apache.org/jira/browse/OAK-1263
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: query
> Affects Versions: 0.12
> Reporter: Stefan Egli
> Assignee: Alex Parvulescu
> Fix For: 0.17
>
>
> We have a use case where we'd like to be able to use an index in a
> "pagination-like" fashion. That is, we'd like to be able to have an index on
> a subtree on a certain property, and then run a query which does ORDER BY
> that property combined with OFFSET. That way, essentially allowing pagination
> of child nodes of a particular parent based on 'sorted by a certain property'.
> AFAIU currently the oak index is not optimized to support ORDER BY queries in
> a fast manner. The index keeps 'the child nodes unsorted', ie to process an
> ORDER BY, the child nodes would have to be 'manually sorted' which can result
> in bad performance given a large number of child nodes.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)