Encoding data to be sorted
Abstract
Key conditioning involves the construction of a byte orderable array from values for a possibly multi-field key concatenated key, for comparison by a sort routine. Byte-orderable sort keys are conditioned prior to execution of a sort routine, to facilitate an accurate and/or efficient sort procedure. For example, key conditioning may be applied to values in one or more columns of a database table, where the column(s) are used as keys for sorting rows of the table. Six factors are considered in encoding the byte array, such as whether nulls compare high or low; whether a field is fixed width or variable width; whether a field is guaranteed to be not null; whether a field is ordered ascending or descending; whether a field is the last field of a multi-field sort key or the only field of a sort key; and whether a field is likely to contain a significant number of zero values.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 8 · Forward citations: 1.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method for encoding data to be sorted, the method comprising the steps of: in response to a request to arrange a plurality of data items in a sorted order based on values for one or more fields of the data items, performing the steps of: reading data that explicitly indicates whether null values for the one or more fields should be treated, for the purpose of sort operations, as being higher than the highest non-null value, or lower than the lowest non-null value; constructing an array of bytes for each data item, the array of bytes representing an encoding of the values
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (1 of 1 total)
References Cited — Backward Prior Art (8)
Non-Patent Literature (5)
- "7.3 Quick Sort" retrieved on Sep. 10, 2004 from the Internet< URL: http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/qsort.html.>.
- "7.5 Radix Sorting" retrieved on Sep. 10, 2004 from the Internet< URL: http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/radixsort.html.>.
- Baer, Jean-Loup, "Improving Quicksort Performance with a Codeword Data Structure", IEEE Transactions on Software Engineering, vol. 15 (1989) pp. 622-631.
- Bentley, Jon L. et al., "Fast Algorithms for Sorting and Searching Strings", pp. 1-10.
- Blasgen, Michael W. et al., "An Encoding Method for Multifield Sorting and Indexing" Association for Computing Machinery, Inc. (1977) pp. 874-878.