[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2021-01-21 Thread Andrei Dulceanu (Jira)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Dulceanu updated OAK-4934:
-
Fix Version/s: (was: 1.38.0)
   1.40.0

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.40.0
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



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


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2020-11-06 Thread Andrei Dulceanu (Jira)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Dulceanu updated OAK-4934:
-
Fix Version/s: (was: 1.36.0)

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.38.0
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



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


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2020-11-06 Thread Andrei Dulceanu (Jira)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Dulceanu updated OAK-4934:
-
Fix Version/s: 1.38.0

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.36.0, 1.38.0
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



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


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2019-06-04 Thread Davide Giannella (JIRA)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Giannella updated OAK-4934:
--
Fix Version/s: (was: 1.14.0)

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.16.0
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2019-06-04 Thread Davide Giannella (JIRA)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Giannella updated OAK-4934:
--
Fix Version/s: 1.16.0

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.14.0, 1.16.0
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2019-04-09 Thread Davide Giannella (JIRA)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Giannella updated OAK-4934:
--
Fix Version/s: (was: 1.12.0)

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.14.0
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2019-04-09 Thread Davide Giannella (JIRA)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Giannella updated OAK-4934:
--
Fix Version/s: 1.14.0

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.12.0, 1.14.0
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2019-01-09 Thread Davide Giannella (JIRA)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Giannella updated OAK-4934:
--
Fix Version/s: (was: 1.10.0)

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.12
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2019-01-09 Thread Davide Giannella (JIRA)


 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Giannella updated OAK-4934:
--
Fix Version/s: 1.12

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>Priority: Major
> Fix For: 1.10.0, 1.12
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2017-11-16 Thread Thomas Mueller (JIRA)

 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Mueller updated OAK-4934:

Fix Version/s: (was: 1.8)
   1.10

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
> Fix For: 1.10
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2017-03-14 Thread Chetan Mehrotra (JIRA)

 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chetan Mehrotra updated OAK-4934:
-
Fix Version/s: 1.8

> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
> Fix For: 1.8
>
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions. Path restriction can cause some difference though
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2016-10-13 Thread Chetan Mehrotra (JIRA)

 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chetan Mehrotra updated OAK-4934:
-
Description: 
For certain requirements it would be good to have a notion/support to deduce 
query shape [1]

{quote}
 A combination of query predicate, sort, and projection specifications.

For the query predicate, only the structure of the predicate, including the 
field names, are significant; the values in the query predicate are 
insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
the query predicate \{ type: 'utensil' \} for a query shape.
{quote}

So transforming that to Oak the shape should represent a JCR-SQL2 query string 
(xpath query gets transformed to SQL2) which is a *canonical* representation of 
actual query ignoring the property restriction values. 

Example we have 2 queries
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'published'
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'disabled'

The query shape would be 

SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
The plan for query having given shape would remain same irrespective of value 
of property restrictions. Path restriction can cause some difference though

The shape can then be used for
* Stats Collection - Currently stats collection gets overflown if same query 
with different value gets invoked
* Allow configuring hints - See support in Mongo [2] for an example. One 
specify via config that for a query of such and such shape this index should be 
used
* Less noisy diagnostics - If a query gets invoked with bad plan the QE can log 
the warning once instead of logging it for each query invocation involving 
different values.

[1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
[2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/

  was:
For certain requirements it would be good to have a notion/support to deduce 
query shape [1]

{quote}
 A combination of query predicate, sort, and projection specifications.

For the query predicate, only the structure of the predicate, including the 
field names, are significant; the values in the query predicate are 
insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
the query predicate \{ type: 'utensil' \} for a query shape.
{quote}

So transforming that to Oak the shape should represent a JCR-SQL2 query string 
(xpath query gets transformed to SQL2) which is a *canonical* representation of 
actual query ignoring the property restriction values. 

Example we have 2 queries
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'published'
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'disabled'

The query shape would be 

SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
The plan for query having given shape would remain same irrespective of value 
of property restrictions

The shape can then be used for
* Stats Collection - Currently stats collection gets overflown if same query 
with different value gets invoked
* Allow configuring hints - See support in Mongo [2] for an example. One 
specify via config that for a query of such and such shape this index should be 
used
* Less noisy diagnostics - If a query gets invoked with bad plan the QE can log 
the warning once instead of logging it for each query invocation involving 
different values.

[1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
[2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/


> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM 

[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2016-10-13 Thread Chetan Mehrotra (JIRA)

 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chetan Mehrotra updated OAK-4934:
-
Description: 
For certain requirements it would be good to have a notion/support to deduce 
query shape [1]

{quote}
 A combination of query predicate, sort, and projection specifications.

For the query predicate, only the structure of the predicate, including the 
field names, are significant; the values in the query predicate are 
insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
the query predicate \{ type: 'utensil' \} for a query shape.
{quote}

So transforming that to Oak the shape should represent a JCR-SQL2 query string 
(xpath query gets transformed to SQL2) which is a *canonical* representation of 
actual query ignoring the property restriction values. 

Example we have 2 queries
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'published'
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'disabled'

The query shape would be 

SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
The plan for query having given shape would remain same irrespective of value 
of property restrictions

The shape can then be used for
* Stats Collection - Currently stats collection gets overflown if same query 
with different value gets invoked
* Allow configuring hints - See support in Mongo [2] for an example. One 
specify via config that for a query of such and such shape this index should be 
used
* Less noisy diagnostics - If a query gets invoked with bad plan the QE can log 
the warning once instead of logging it for each query invocation involving 
different values.

[1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
[2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/

  was:
For certain requirements it would be good to have a notion/support to deduce 
query shape [1]

{quote}
 A combination of query predicate, sort, and projection specifications.

 For the query predicate, only the structure of the predicate, including the 
field names, are significant; the values in the query predicate are 
insignificant. As such, a query predicate { type: 'food' } is equivalent to the 
query predicate { type: 'utensil' } for a query shape.
{quote}

So transforming that to Oak the shape should represent a JCR-SQL2 query string 
(xpath query gets transformed to SQL2) which is a *canonical* representation of 
actual query ignoring the property restriction values. 

Example we have 2 queries
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'published'
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'disabled'

The query shape would be 

SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
The plan for query having given shape would remain same irrespective of value 
of property restrictions

The shape can then be used for
* Stats Collection - Currently stats collection gets overflown if same query 
with different value gets invoked
* Allow configuring hints - See support in Mongo [2] for an example. One 
specify via config that for a query of such and such shape this index should be 
used
* Less noisy diagnostics - If a query gets invoked with bad plan the QE can log 
the warning once instead of logging it for each query invocation involving 
different values.

[1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
[2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/


> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
> For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate \{ type: 'food' \} is equivalent to 
> the query predicate \{ type: 'utensil' \} for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 

[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2016-10-13 Thread Chetan Mehrotra (JIRA)

 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chetan Mehrotra updated OAK-4934:
-
Description: 
For certain requirements it would be good to have a notion/support to deduce 
query shape [1]

{quote}
 A combination of query predicate, sort, and projection specifications.

 For the query predicate, only the structure of the predicate, including the 
field names, are significant; the values in the query predicate are 
insignificant. As such, a query predicate { type: 'food' } is equivalent to the 
query predicate { type: 'utensil' } for a query shape.
{quote}

So transforming that to Oak the shape should represent a JCR-SQL2 query string 
(xpath query gets transformed to SQL2) which is a *canonical* representation of 
actual query ignoring the property restriction values. 

Example we have 2 queries
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'published'
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'disabled'

The query shape would be 

SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
The plan for query having given shape would remain same irrespective of value 
of property restrictions

The shape can then be used for
* Stats Collection - Currently stats collection gets overflown if same query 
with different value gets invoked
* Allow configuring hints - See support in Mongo [2] for an example. One 
specify via config that for a query of such and such shape this index should be 
used
* Less noisy diagnostics - If a query gets invoked with bad plan the QE can log 
the warning once instead of logging it for each query invocation involving 
different values.

[1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
[2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/

  was:
For certain requirements it would be good to have a notion/support to deduce 
query shape [1]

{quote}
 A combination of query predicate, sort, and projection specifications.

 For the query predicate, only the structure of the predicate, including the 
field names, are significant; the values in the query predicate are 
insignificant. As such, a query predicate { type: 'food' } is equivalent to the 
query predicate { type: 'utensil' } for a query shape.
{quote}

So transforming that to Oak the shape should represent a JCR-SQL2 query string 
which is a canonical representation of actual query ignoring the property 
restriction values. 

Example we have 2 queries
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'published'
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'disabled'

The query shape would be 

SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
The plan for query having given shape would remain same irrespective of value 
of property restrictions

The shape can then be used for
* Stats Collection - Currently stats collection gets overflown if same query 
with different value gets invoked
* Allow configuring hints - See support in Mongo [2] for an example. One 
specify via config that for a query of such and such shape this index should be 
used
* Less noisy diagnostics - If a query gets invoked with bad plan the QE can log 
the warning once instead of logging it for each query invocation involving 
different values.

[1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
[2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/


> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
>  For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate { type: 'food' } is equivalent to 
> the query predicate { type: 'utensil' } for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string (xpath query gets transformed to SQL2) which is a *canonical* 
> representation of actual query ignoring the property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape 

[jira] [Updated] (OAK-4934) Query shapes for JCR Query

2016-10-13 Thread Chetan Mehrotra (JIRA)

 [ 
https://issues.apache.org/jira/browse/OAK-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chetan Mehrotra updated OAK-4934:
-
Description: 
For certain requirements it would be good to have a notion/support to deduce 
query shape [1]

{quote}
 A combination of query predicate, sort, and projection specifications.

 For the query predicate, only the structure of the predicate, including the 
field names, are significant; the values in the query predicate are 
insignificant. As such, a query predicate { type: 'food' } is equivalent to the 
query predicate { type: 'utensil' } for a query shape.
{quote}

So transforming that to Oak the shape should represent a JCR-SQL2 query string 
which is a canonical representation of actual query ignoring the property 
restriction values. 

Example we have 2 queries
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'published'
* SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
'disabled'

The query shape would be 

SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
The plan for query having given shape would remain same irrespective of value 
of property restrictions

The shape can then be used for
* Stats Collection - Currently stats collection gets overflown if same query 
with different value gets invoked
* Allow configuring hints - See support in Mongo [2] for an example. One 
specify via config that for a query of such and such shape this index should be 
used
* Less noisy diagnostics - If a query gets invoked with bad plan the QE can log 
the warning once instead of logging it for each query invocation involving 
different values.

[1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
[2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/

  was:
For certain requirements it would be good to have a notion/support to deduce 
query shape [1]

{quote}

[1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape


> Query shapes for JCR Query
> --
>
> Key: OAK-4934
> URL: https://issues.apache.org/jira/browse/OAK-4934
> Project: Jackrabbit Oak
>  Issue Type: Wish
>  Components: query
>Reporter: Chetan Mehrotra
>
> For certain requirements it would be good to have a notion/support to deduce 
> query shape [1]
> {quote}
>  A combination of query predicate, sort, and projection specifications.
>  For the query predicate, only the structure of the predicate, including the 
> field names, are significant; the values in the query predicate are 
> insignificant. As such, a query predicate { type: 'food' } is equivalent to 
> the query predicate { type: 'utensil' } for a query shape.
> {quote}
> So transforming that to Oak the shape should represent a JCR-SQL2 query 
> string which is a canonical representation of actual query ignoring the 
> property restriction values. 
> Example we have 2 queries
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'published'
> * SELECT   * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 
> 'disabled'
> The query shape would be 
> SELECT * FROM [app:Asset] AS a WHERE  a.[jcr:content/metadata/status] = 'A'. 
> The plan for query having given shape would remain same irrespective of value 
> of property restrictions
> The shape can then be used for
> * Stats Collection - Currently stats collection gets overflown if same query 
> with different value gets invoked
> * Allow configuring hints - See support in Mongo [2] for an example. One 
> specify via config that for a query of such and such shape this index should 
> be used
> * Less noisy diagnostics - If a query gets invoked with bad plan the QE can 
> log the warning once instead of logging it for each query invocation 
> involving different values.
> [1] https://docs.mongodb.com/manual/reference/glossary/#term-query-shape
> [2] https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/



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