[ https://issues.apache.org/jira/browse/DERBY-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575788#action_12575788 ]
A B commented on DERBY-2998: ---------------------------- > I do not have any more work lined up on this for 10.4. Okay, thanks Thomas! The reason I asked is because on Feb 25 I posted a bunch of comments, of which #8 mentioned how predicates on a ROW_NUMBER() do *not* actually limit rows from store, and thus such a restriction will probably not meet the performance expectations of the user who specifies it. For reference, the example query was: SELECT * FROM ( SELECT row_number() over () as r, t.* FROM T ) AS tmp WHERE r <= 3; for which the plan shows the following for the top-most ProjectRestrictResultSet: ******* Project-Restrict ResultSet (1): Number of opens = 1 Rows seen = 1280 Rows filtered = 1277 restriction = true So we actually read all 1280 rows from disk, then filtered 1277 of them out so that, in the end, we only returned 3 rows. In response to that you wrote (on Feb 26): Thomas> It seems we don't take the fact that we know we have an ascending column Thomas> into consideration any more (we used to). I'll have to have another look at this. So is it safe to say that this will *not* be addressed for 10.4? That's perfectly fine, I just want to make sure we're clear on that (esp. so that if users ask, we can give a clear answer :) Do you think it would be worth it to file a separate enhancement Jira for that particular task? (or is there one already?) > Add support for ROW_NUMBER() window function > -------------------------------------------- > > Key: DERBY-2998 > URL: https://issues.apache.org/jira/browse/DERBY-2998 > Project: Derby > Issue Type: Sub-task > Components: SQL > Reporter: Thomas Nielsen > Assignee: Thomas Nielsen > Priority: Minor > Attachments: d2998-10.diff, d2998-10.stat, d2998-11.diff, > d2998-12.diff, d2998-12.stat, d2998-13.diff, d2998-13.stat, d2998-14.diff, > d2998-14.stat, d2998-15.diff, d2998-15.stat, d2998-16.diff, d2998-16.stat, > d2998-17.diff, d2998-17.stat, d2998-18.diff, d2998-18.stat, d2998-19.diff, > d2998-19.stat, d2998-4.diff, d2998-4.stat, d2998-5.diff, d2998-5.stat, > d2998-6.diff, d2998-6.stat, d2998-7.diff, d2998-7.stat, d2998-8.diff, > d2998-8.stat, d2998-9-derby.log, d2998-9.diff, d2998-9.stat, > d2998-doc-1.diff, d2998-doc-1.stat, d2998-doc-2.diff, d2998-doc-2.stat, > d2998-followup-2.diff, d2998-followup-2.stat, d2998-followup-distinct.diff, > d2998-followup-distinct.diff, d2998-followup-distinct.stat, > d2998-followup-doc3.diff, d2998-followup-doc3.stat, > d2998-followup-issue1.diff, d2998-followup-issue1.stat, > d2998-followup-issue4.diff, d2998-followup-issue4.stat, > d2998-followup-removeunused.diff, d2998-followup-testsuite.diff, > d2998-followup-testsuite.stat, d2998-test.diff, d2998-test.stat, > d2998-test2.diff, d2998-test2.stat, d2998-test3.diff, d2998-test3.stat, > d2998-test4.diff, d2998-test4.stat, d2998-test6.diff, d2998-test7.diff, > d2998-test8.diff, d2998-test9.diff, rreffuncrownumber.html > > > As part of implementing the overall OLAP Operations features of SQL > (DERBY-581), implement the ROW_NUMBER() window function. > More information about this feature is available at > http://wiki.apache.org/db-derby/OLAPRowNumber -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.