Method and apparatus for generating statistics on query expressions for optimization
Abstract
A method and apparatus for creating a statistical representation of a query result that can be performed without executing the underlying query. For a binary-join query, a scan is performed on one of the join tables. A multiplicity value that estimates the number of tuples in the other join table that has a matching join attribute to the scanned tuple is calculated. A number of copies (as determined by the multiplicity value) are placed in a stream of tuples that is sampled to compile the statistical representation of the query result. For acyclic-join generating queries including selections, the above procedure is recursively extended. If multiple statistical representations are sought, scans can be shared. Scan sharing can be optimized using shortest common supersequence techniques.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 31.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
In a relational database having records in the form of tables of tuples stored therein, a method for compiling a statistical representation of an attribute for tuples that verify a user query wherein the user query comprises a join predicate that joins first and second database tables on a join attribute, the method comprising the steps of: scanning the tuples contained in the second database table; for each scanned tuple, determining a statistical multiplicity value based on a number of tuples from the first database table that have a matching join attribute with respect to the scanned tuple;
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 31 total)
References Cited — Backward Prior Art (7)
Non-Patent Literature (5)
- Bruno, N. & Surajit Chaudhuri, "Efficient creation of satistics over query expressions", in Proceedings of Data Engineering, 19<SUP>th </SUP>International Conference on Mar. 5-8, 2003, on pp. 201-212.
- G. Nicosia and G. Oriolo, "Solving the Shortest Common Supersequence Problem", In Operation Research, Springer-Verlag, 2001, pages: 7.
- M. Stillger, G.M. Lohman, V. Markl and M. Kandil, "LEO-DB2's Learning Optimizer", In Proceedings of the Twenty Seventh Int'l Conference on Very Large Databases, 2001, pages: 10.
- N. Bruno and S. Chaudhuri, "Exploiting Statistics on Query Expressions for Optimization", In Proceedings of the 2002 ACM Int'l Conference on Management of Data, 2002, pages: 12.
- Oracle9i Database Performance Tuning Guide and Reference, Release 2(9.2), Oct. 2002. Chapter 1, pp. 1-2 to 1-10, 1-14 to 1-24, 1-34 to 1-45; Chapter 3, pp. 3-20 to 3-26; Chapter 9, pp. 9-4 to 9-22.