Optimizing a database query that fetches N rows
Abstract
An apparatus and method to optimize a query access plan in a computer database system. In preferred embodiments, the query optimizer determines the query can be optimized and generates for the query an optimized access plan that eliminates records defined by a Where clause and one or more ordering criteria prior to ordering the records (sorting or grouping) and then returning a first n rows.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 23 · Forward citations: 7.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
An apparatus comprising: at least one processor; a memory coupled to the at least one processor containing a database of records; a query residing in the memory that includes a Select statement with a Fetch First n Rows Only clause, where n is an integer variable; a query optimizer residing in the memory and executed by the at least one processor, wherein the query optimizer: determines that the query can be optimized and generates for the query an optimized access plan that eliminates records defined by a Where clause prior to ordering the records and then returns a first n rows; determines t
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (7 of 7 total)
References Cited — Backward Prior Art (23)
Non-Patent Literature (1)
- "Treating Data Transformations as Objects", Sep. 1992, IBM Technical Disclosure Bulletin, vol. 35, Issue 4A, pp. 200-205.