Bug 3006 - Keep result of UNION sorted when inputs are sorted
Summary: Keep result of UNION sorted when inputs are sorted
Status: NEW
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: -- development
Hardware: All All
: Normal enhancement
Assignee: SQL devs
URL:
Keywords: NONEEDTOTEST
Depends on:
Blocks:
 
Reported: 2012-02-14 17:20 CET by Roberto Cornacchia
Modified: 2016-04-11 11:46 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Cornacchia 2012-02-14 17:20:14 CET
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Build Identifier: 

Currently, the MAL plan of a sql UNION clause is translated using appends.
When the input tables are sorted on the same attribute it makes sense to use a merge-union approach, to maintain sortedness in the result.

The expected impact is large for certain applications. For example, this would make it viable to build sorted dictionaries incrementally: appending deltas and then sorting explicitly is no option with large data. This is one of the few show-stoppers I still see to use MonetDB (more) efficiently for IR.
(hint: I know the same core functionality was used within MonetDB/XQuery)


Reproducible: Always
Comment 1 Sjoerd Mullender cwiconfidential 2012-08-24 14:56:05 CEST
Jul2012-SP1 has been released.
Comment 2 Ying Zhang cwiconfidential 2012-11-27 15:46:05 CET
No test needed for feature request