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

Thomas Mueller commented on OAK-1263:
-------------------------------------

I'm trying to apply the patch; some manual work is needed:

{noformat}
patch ~/Downloads/OAK-1263-r5.patch 
U         
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
U         
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndex.java
U         
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndex.java
C         
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexLookup.java
>         rejected hunk @@ -17,28 +17,101 @@
U         
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
U         
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/OrderedContentMirrorStoreStrategy.java
U         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/BasicOrderedPropertyIndexQueryTest.java
>         applied hunk @@ -58,6 +61,12 @@ with fuzz 2
A         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderDirectionEnumTest.java
A         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndexCostTest.java
U         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexDescendingQueryTest.java
C         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorTest.java
>         rejected hunk @@ -88,15 +87,6 @@
C         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexQueryTest.java
>         rejected hunk @@ -117,21 +119,439 @@
U         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/ValuePathTuple.java
A         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/ValuePathTupleTest.java
U         
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/OrderedContentMirrorStorageStrategyTest.java
>         applied hunk @@ -974,32 +986,6 @@ with fuzz 2
>         applied hunk @@ -1029,42 +1015,6 @@ with fuzz 2
>         applied hunk @@ -1200,6 +1150,68 @@ with fuzz 2
U         
oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
D         
oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/OrderByQueryTest.java
C         
oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/OrderedIndexBaseTest.java
>         rejected hunk @@ -54,6 +54,11 @@
>         rejected hunk @@ -68,11 +73,27 @@
U         
oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/OrderedIndexQueryBaseTest.java
Summary of conflicts:
  Text conflicts: 4
{noformat}

> 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: Thomas Mueller
>             Fix For: 0.19
>
>         Attachments: OAK-1263-r1.patch, OAK-1263-r1a.patch, 
> OAK-1263-r1b.patch, OAK-1263-r1c.patch, OAK-1263-r1d.patch, 
> OAK-1263-r2.patch, OAK-1263-r3.patch, OAK-1263-r4.patch, OAK-1263-r5.patch, 
> benchmark-20140228112150.log, benchmark-20140228120718.log, 
> benchmark-20140228125248.log
>
>
> 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.2#6252)

Reply via email to