Patent ID: 7899844

Claim:
A computer-readable storage medium having stored therein a set of instructions which, when executed, perform a method comprising: defining a first boundary set by iterating through a number of record rows, wherein the record rows are retrieved from a database and are sorted according to a sort order, each of the record rows comprises a plurality of columns, the sort order is based on data stored in at least two columns of the plurality of columns, the first boundary set comprises a plurality of boundary markers, the defining comprises iterating through the record rows, and defining a boundary marker every Nth row of the record rows, wherein N is a data bucket size, a value of N is less than the number of record rows, the value of N is inversely proportional to a percentage of the number of record rows that is represented by a number of rows requested, the number of rows requested is determined according to a user-specified selection criterion, and each boundary marker comprises a set of data corresponding to row data of a corresponding row of the at least two columns on which the sort order is based, the plurality of boundary markers is configured to logically partition the record rows into a plurality of continuous sections, wherein each of the plurality of continuous sections comprises N record rows of the record rows, except for a last continuous section of the plurality of continuous sections, and the last continuous section comprises up to N record rows; storing the first boundary set, wherein the boundary markers of the first boundary set are stored in sequential order in accordance with the sort order, and each pair of sequentially-adjacent boundary markers bounds a single continuous section of the plurality of continuous sections; receiving a request for requested rows from the record rows sorted in the sort order; searching the first boundary set for a pair of sequentially-adjacent boundary markers that bounds at least a portion of the requested rows; and querying the database according to the pair of sequentially-adjacent boundary markers to retrieve a first continuous section that contains at least the portion of the requested rows.