[jira] [Commented] (OAK-1965) Support for constraints like: foo = 'X' OR bar = 'Y'

2016-02-25 Thread Thomas Mueller (JIRA)

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

Thomas Mueller commented on OAK-1965:
-

Please note in Oak 1.3.x and 1.4.x, this feature was removed, see OAK-4038.

> Support for constraints like: foo = 'X' OR bar = 'Y'
> 
>
> Key: OAK-1965
> URL: https://issues.apache.org/jira/browse/OAK-1965
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: core, query
>Reporter: Jukka Zitting
>Assignee: Jukka Zitting
> Fix For: 1.1.0
>
> Attachments: oak-core-1.0.3-OAK-1965-SNAPSHOT.jar
>
>
> Consider the following query statement:
> {noformat}
> SELECT * FROM [nt:base] WHERE [foo] = 'X OR [bar] = 'Y'
> {noformat}
> Such a query could be fairly efficiently executed against a property index 
> that indexes the values of both "foo" and "bar" properties. However, the 
> query engine doesn't pass such OR constraints down to the index 
> implementations, so we currently can't leverage such an index for this query.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-1965) Support for constraints like: foo = 'X' OR bar = 'Y'

2014-07-22 Thread David Gonzalez (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14071319#comment-14071319
 ] 

David Gonzalez commented on OAK-1965:
-

[~jukkaz] FYI - after installing this, my instance has been restarting for 6+ 
hours; When I enabled DEBUG on org.jackrabbit logs, I see a wall of... 

{noformat}
22.07.2014 23:08:46.051 *DEBUG* [TarMK compaction thread 
[/xxx/repository/segmentstore], active since Tue Jul 22 02:00:00 EDT 2014, 
previous max duration 0ms] org.apache.jackrabbit.oak.plugins.segment.SegmentId 
Loading segment 4b993a00-2233-4c8c-a9fa-e9e4fab8a665
{noformat}

With 147 and counting new segment store tar files since the installation. 
Doesn't seem directly related, but was an unexpected side effect of installing 
this jar.

 Support for constraints like: foo = 'X' OR bar = 'Y'
 

 Key: OAK-1965
 URL: https://issues.apache.org/jira/browse/OAK-1965
 Project: Jackrabbit Oak
  Issue Type: Improvement
  Components: core, query
Reporter: Jukka Zitting
Assignee: Jukka Zitting
 Fix For: 1.1

 Attachments: oak-core-1.0.3-OAK-1965-SNAPSHOT.jar


 Consider the following query statement:
 {noformat}
 SELECT * FROM [nt:base] WHERE [foo] = 'X OR [bar] = 'Y'
 {noformat}
 Such a query could be fairly efficiently executed against a property index 
 that indexes the values of both foo and bar properties. However, the 
 query engine doesn't pass such OR constraints down to the index 
 implementations, so we currently can't leverage such an index for this query.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (OAK-1965) Support for constraints like: foo = 'X' OR bar = 'Y'

2014-07-21 Thread Thomas Mueller (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14068269#comment-14068269
 ] 

Thomas Mueller commented on OAK-1965:
-

I'm not happy with the proposed (and implemented) solution. Unfortunately I was 
on vacation so I did not see this issue. The proposed solution requires a 
special index (an index on both properties), and makes the index implementation 
more complicated.

Please note x = 1 or y = 2 is already very fast for XPath, because it is 
converted to a union. That means, the query is fast if there is an index on 
x plus another index on y. The missing piece is using union for SQL-2 as 
well. OAK-1617 is about automatically converting to union for SQL-2. Once 
this is implemented, the solution here will not be needed any longer.

 Support for constraints like: foo = 'X' OR bar = 'Y'
 

 Key: OAK-1965
 URL: https://issues.apache.org/jira/browse/OAK-1965
 Project: Jackrabbit Oak
  Issue Type: Improvement
  Components: core, query
Reporter: Jukka Zitting
Assignee: Jukka Zitting
 Fix For: 1.1

 Attachments: oak-core-1.0.3-OAK-1965-SNAPSHOT.jar


 Consider the following query statement:
 {noformat}
 SELECT * FROM [nt:base] WHERE [foo] = 'X OR [bar] = 'Y'
 {noformat}
 Such a query could be fairly efficiently executed against a property index 
 that indexes the values of both foo and bar properties. However, the 
 query engine doesn't pass such OR constraints down to the index 
 implementations, so we currently can't leverage such an index for this query.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (OAK-1965) Support for constraints like: foo = 'X' OR bar = 'Y'

2014-07-21 Thread Jukka Zitting (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14068619#comment-14068619
 ] 

Jukka Zitting commented on OAK-1965:


Agreed, OAK-1617 would solve this issue in a more generic manner (the current 
solution only works with direct equality and IN constraints). No objections to 
replacing this solution with OAK-1617 once it's available.

 Support for constraints like: foo = 'X' OR bar = 'Y'
 

 Key: OAK-1965
 URL: https://issues.apache.org/jira/browse/OAK-1965
 Project: Jackrabbit Oak
  Issue Type: Improvement
  Components: core, query
Reporter: Jukka Zitting
Assignee: Jukka Zitting
 Fix For: 1.1

 Attachments: oak-core-1.0.3-OAK-1965-SNAPSHOT.jar


 Consider the following query statement:
 {noformat}
 SELECT * FROM [nt:base] WHERE [foo] = 'X OR [bar] = 'Y'
 {noformat}
 Such a query could be fairly efficiently executed against a property index 
 that indexes the values of both foo and bar properties. However, the 
 query engine doesn't pass such OR constraints down to the index 
 implementations, so we currently can't leverage such an index for this query.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (OAK-1965) Support for constraints like: foo = 'X' OR bar = 'Y'

2014-07-18 Thread Jukka Zitting (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14066308#comment-14066308
 ] 

Jukka Zitting commented on OAK-1965:


Yes, this is specific to OR constraints. The OAK-1871 issue is broader, it 
requires changes in the index structure whereas this improvement was possible 
by better utilizing the information that's already stored by the existing 
property indexes.

 Support for constraints like: foo = 'X' OR bar = 'Y'
 

 Key: OAK-1965
 URL: https://issues.apache.org/jira/browse/OAK-1965
 Project: Jackrabbit Oak
  Issue Type: Improvement
  Components: core, query
Reporter: Jukka Zitting
Assignee: Jukka Zitting
 Fix For: 1.1

 Attachments: oak-core-1.0.3-OAK-1965-SNAPSHOT.jar


 Consider the following query statement:
 {noformat}
 SELECT * FROM [nt:base] WHERE [foo] = 'X OR [bar] = 'Y'
 {noformat}
 Such a query could be fairly efficiently executed against a property index 
 that indexes the values of both foo and bar properties. However, the 
 query engine doesn't pass such OR constraints down to the index 
 implementations, so we currently can't leverage such an index for this query.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (OAK-1965) Support for constraints like: foo = 'X' OR bar = 'Y'

2014-07-17 Thread Jukka Zitting (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14064988#comment-14064988
 ] 

Jukka Zitting commented on OAK-1965:


FTR, here's how to use this improvement:

* Assume you have queries with OR constraints containing equality or IN tests 
for more than a single property from one selector, like the {{[foo] = 'X' OR 
[bar] = 'Y'}} constraint from above. Previously it was not possible to use an 
index to speed up the evaluation of such constraints.
* Configure a property index whose {{propertyNames}} list includes all the 
properties you expect to use in such queries. For example, a fooBarIndex with 
{{propertyNames = ['foo', 'bar']}} for the query above.
* With this improvement the property index will automatically detect such an OR 
constraint and treat it as an extended IN constraint like {{([foo] OR [bar]) 
IN ('X', 'Y')}} that can be evaluated against the configured index since it 
covers the values of both properties.
* To verify that this functionality is indeed in place, you can use the 
{{EXPLAIN}} feature or debug logging of the query engine to check that the 
query plan mentions property fooBarIndex IN (foo, bar) as the index and 
constraints being used.

 Support for constraints like: foo = 'X' OR bar = 'Y'
 

 Key: OAK-1965
 URL: https://issues.apache.org/jira/browse/OAK-1965
 Project: Jackrabbit Oak
  Issue Type: Improvement
  Components: core, query
Reporter: Jukka Zitting
Assignee: Jukka Zitting
 Fix For: 1.1


 Consider the following query statement:
 {noformat}
 SELECT * FROM [nt:base] WHERE [foo] = 'X OR [bar] = 'Y'
 {noformat}
 Such a query could be fairly efficiently executed against a property index 
 that indexes the values of both foo and bar properties. However, the 
 query engine doesn't pass such OR constraints down to the index 
 implementations, so we currently can't leverage such an index for this query.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (OAK-1965) Support for constraints like: foo = 'X' OR bar = 'Y'

2014-07-17 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14066067#comment-14066067
 ] 

Vikas Saurabh commented on OAK-1965:


Is this specific for 'OR'... there is another issue OAK-1871 for 'AND' of 
multiple properties ... is it possible to get that too?

 Support for constraints like: foo = 'X' OR bar = 'Y'
 

 Key: OAK-1965
 URL: https://issues.apache.org/jira/browse/OAK-1965
 Project: Jackrabbit Oak
  Issue Type: Improvement
  Components: core, query
Reporter: Jukka Zitting
Assignee: Jukka Zitting
 Fix For: 1.1

 Attachments: oak-core-1.0.3-OAK-1965-SNAPSHOT.jar


 Consider the following query statement:
 {noformat}
 SELECT * FROM [nt:base] WHERE [foo] = 'X OR [bar] = 'Y'
 {noformat}
 Such a query could be fairly efficiently executed against a property index 
 that indexes the values of both foo and bar properties. However, the 
 query engine doesn't pass such OR constraints down to the index 
 implementations, so we currently can't leverage such an index for this query.



--
This message was sent by Atlassian JIRA
(v6.2#6252)