You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2012/10/01 23:13:08 UTC

[jira] [Updated] (DERBY-3276) Order by on aggregate always does a sort even if the sort is not needed.

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

Mamta A. Satoor updated DERBY-3276:
-----------------------------------

    Urgency: Normal
     Labels: derby_triage10_10  (was: )
    
> Order by on aggregate always does a sort even if the sort is not needed.
> ------------------------------------------------------------------------
>
>                 Key: DERBY-3276
>                 URL: https://issues.apache.org/jira/browse/DERBY-3276
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Manish Khettry
>              Labels: derby_triage10_10
>
> See DERBY-3231 for details.
> A few different variations of queries that do not need a sort are:
> select b, max(a) from yy where a=5 group by b order by max(a) asc;
> select b, max(a) from yy where a=5 group by b order by max(a) desc;
> Also consider
> select a, sum(b) from yy group by a having sum(b) = 2 order by sum(b);

--
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