You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Till (JIRA)" <ji...@apache.org> on 2016/08/23 21:27:21 UTC

[jira] [Commented] (ASTERIXDB-1606) Optimize "last value" query

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

Till commented on ASTERIXDB-1606:
---------------------------------

I think that the pushdown of the {{limit}} clause should do that. AFAIK [~wangsaeu] already did that during his index-only work (not yet in master ...).

> Optimize "last value" query
> ---------------------------
>
>                 Key: ASTERIXDB-1606
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1606
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Steven Jacobs
>            Priority: Minor
>
> We need to work on optimizing queries looking for a "most recent" or "greatest" value of a given field. 
> As an example, consider an append-only dataset filled with user locations over time, and suppose we want to know the user's last known location. Currently, we would need to do this as an:
> order by $record.timeStamp
> limit 1
> We could improve this in two ways:
> 1) Improve usability by providing an alias syntax for users, e.g. "where greatest timeStamp"
> 2) Improve the compilation of such a job to only retrieve a single record.



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