Optimization of SQL queries using filtering predicates
Abstract
A technique for optimizing execution of a query that accesses data stored on a data store connected to a computer. Query predicates involving different data types are identified. A second query predicate is generated which includes matching data types, and if necessary, converted operators. The second query predicate with the matching data types and/or converted operators is executed to obtain a subset of records using an index manager or data manager. The subset of records is converted to the data types of the remaining query predicates. The first query predicate is applied against the subset of records to obtain a result, and the remaining query predicates of the original query are applied to the result of the first query predicate and any other additional converted query predicates to obtain a final result.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 14 · Forward citations: 59.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method of optimizing execution of a query against a database in a datastore of a computer, the method comprising: identifying a first query predicate in the query, wherein the first query predicate comprises a comparison between a first data type and a second data type, the first data type is different from the second data type, and the first predicate is non-sargable or directionally-sargable; generating a second query predicate with matching data types, wherein the second data type is converted to the first data type, end the second predicate is sargable or semi-sargable; and executing the
- Claim 2Depends on #1
The method of claim 1 , further comprising converting an operator of the first query predicate, wherein the second query predicate incl
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 59 total)
References Cited — Backward Prior Art (14)
Non-Patent Literature (5)
- "Access Path Selection in a Relational Database Management System", IBM Technical Disclosure Bulletin, vol. 22, No. 4, pp. 1657-1660, Sep. 1979.
- "DB2 Cost Formula", IBM Technical Disclosure Bulletin, 34:12, No. 12, p. 389-394, May 1992.
- Dalamagas, T. et al. "A visual database system for spatial and non-spatial data management", Visual Database Systems 4 (VDB4). IFIP TC2/WG2.6 Fourth Working Conference on Visual Database Systems 4 (VDB4), pp. 105-122, Published: London, UK 1998, vii+380 pp.
- Griffiths, S. P. et al. "Access path selection in a relational database management system", Rpt. No. RJ2429 (32240). Aug. 1, 1979, 59 pp.
- O'Neil, P. et al. "Improved query performance with variant indexes", SIGMOD Record, vol. 26, No. 2, pp. 38-49, Jun. 1997.