×

Maintaining sort order of data in databases

  • US 9,251,155 B1
  • Filed: 03/15/2013
  • Issued: 02/02/2016
  • Est. Priority Date: 05/04/2012
  • Status: Active Grant
First Claim
Patent Images

1. A computer implemented method for maintaining sort order of data in a database, the method comprising:

  • storing an input table in columnar fashion, wherein the input table is stored as a sorted set of rows followed by an unsorted set of rows;

    partitioning the unsorted set of rows into a plurality of subsets of rows wherein each subset of rows comprises data stored in sorted order within the subset of rows; and

    incrementally merging data from the unsorted set of rows to the sorted set of rows, the incremental merging comprising, iteratively;

    selecting a set of rows from the plurality of subsets of rows, wherein the selected set of rows comprises rows with lowest rank in the sort order across the plurality of subsets of rows;

    for each column, identifying a block corresponding to a last row of the selected set of rows being merged; and

    for each column, storing the rows following the last row of the set of rows from the identified block in a new block, wherein the new block for each column is for processing in the next iteration; and

    merging the selected set of rows with the sorted set of rows.

View all claims
  • 6 Assignments
Timeline View
Assignment View
    ×
    ×