Fast select for fetch first n rows with order by
AssigneeInternational Business Machines Corporation
InventorsAkiko Hoshikawa, Allan B. Lebovitz, Akira Shibamiya
Life of this patent
Estimating the term…
Loading patent…
AssigneeInternational Business Machines Corporation
InventorsAkiko Hoshikawa, Allan B. Lebovitz, Akira Shibamiya
Estimating the term…
Fetching an ordered first N rows of a table, includes: reading a row in the table; determining that the read row qualifies as the first N rows of the table for rows read so far, and storing data of the read row; and determining an order of data of qualifying rows and storing the order. Only data in rows that qualify to be among the first N rows are ordered and stored. This provides a significantly more efficient processing. It eliminates tournament tree sorts, corresponding work file read and write I/O's, and associated CPU time. This reduces the time for the running of a query and improves the performance of other applications sharing the use of work files. Further, the improved performance is particular significant when the buffer sizes are within a page of records or rows, although multiple pages may be used.
A computer readable medium encoded with program instructions for fetching an ordered first N rows of a table, wherein N is a number of rows to the fetched, the program instructions configured for:
Dependencies are inferred from the claim text.