You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2013/06/10 14:53:19 UTC

[jira] [Commented] (OAK-862) Aggregate queries

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

Thomas Mueller commented on OAK-862:
------------------------------------

It would be great if we could get some more details, such as the exact query. Is it just:

{code}
select [uid], count(*) from [nt:base] where [uid] is not null group by [uid]
{code}

Do you need the result to be sorted as well ("order by" combined with "group by")?

For "group by duration", it sounds like we also need support for user defined functions, or at least date manipulation (get the year, year+month, year+month+day of a timestamp).

About the results: how large would the number of entries and the sum of all counts typically be? If the sum of all counts is low (1000 or so) then the query engine could just read all entries and count them, but if it's millions then we would need another solution.
                
> Aggregate queries
> -----------------
>
>                 Key: OAK-862
>                 URL: https://issues.apache.org/jira/browse/OAK-862
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: jcr
>            Reporter: sakshi arora
>
> ‘Group by’ query to get count(frequency) for each uid(could be a no. or string). This will extend to 'group by' on multiple fields, with the usual predicates ('where' - already available).
> The use-case involves, frequency-based summary charts.
> As charts are mostly frequency based, e.g. on duration, on category, on date/month/time/year.
> The data collection could range from live data to the daily scheduled synchronization.
> Required efficiency: Queries should be pretty fast, as usual location of these charts is on dashboards (which are the home pages for most sites).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira