摘要:
Methods and apparatus, including computer program products, implementing and using techniques for executing a query in a computer to retrieve data from a relational database stored on a data storage device. A query is received that contains a CASE expression having one or more subqueries. A query execution plan is generated. The query execution plan uses a parameterized union all operator to keep the semantics of the CASE expression, and a nested loop join operator to drive data across the section of the query execution plan that executes the CASE expression without performing any join operations. The generated query execution plan is executed in the computer to retrieve data from the relational database.
摘要:
Methods and apparatus, including computer program products, implementing and using techniques for executing a query in a computer to retrieve data from a relational database stored on a data storage device. A query is received that contains a CASE expression having one or more subqueries. A query execution plan is generated. The query execution plan uses a parameterized union all operator to keep the semantics of the CASE expression, and a nested loop join operator to drive data across the section of the query execution plan that executes the CASE expression without performing any join operations. The generated query execution plan is executed in the computer to retrieve data from the relational database.
摘要:
Techniques are disclosed for generating statistical views in a database system. In one embodiment, a request is received to execute a database workload. One or more constraints pertaining to executing the database workload is retrieved. The database workload is evaluated to generate multiple statistical view candidates. The statistical view candidates are refined based on the one or more constraints. One or more statistical views are then generated based on the refined statistical view candidates.
摘要:
Techniques are disclosed for generating statistical views in a database system. In one embodiment, a request is received to execute a database workload. One or more constraints pertaining to executing the database workload is retrieved. The database workload is evaluated to generate multiple statistical view candidates. The statistical view candidates are refined based on the one or more constraints. One or more statistical views are then generated based on the refined statistical view candidates.
摘要:
A method and system for estimating cardinalities for a plurality of columns in a database system is disclosed. The method and system include obtaining statistics collected for the plurality of columns. A first portion of the statistics indicates at least one relationship between at least a portion of the plurality of columns, while a second portion of the statistics includes single column statistics. The method and system also include utilizing the first portion and the second portion of the statistics to estimate the cardinality for the plurality of columns.
摘要:
A system and process for evaluating the performance of an operational database system without interfering with the normal operation of the operational database system is described. The process involves the creation of a test database which contains the system catalogs of the operational database system as user tables. The test database is used to compile queries using these simulated system catalogs. The access plan generated by the compilation in the test database can then be used to evaluate the performance of the queries.
摘要:
A method and system for collecting statistics on database tables. In one embodiment, the method includes identifying a plurality of tables for statistics collection, wherein each table of the plurality of tables are remote tables; examining at least one attribute for each table identified for statistics collection; prioritizing the tables for statistics collection based on the at least one attribute; and collecting statistics on the identified tables in a priority sequence.
摘要:
A method, computer program product, and system for optimizing aggregate queries are provided. The method, computer program product, and system provide for receiving an aggregate query comprising a GROUP BY operation and an aggregate function, creating an access plan for executing the aggregate query, the access plan including a join between an outer relation and an inner relation, and designating the join included in the access plan as an early out join.
摘要:
A method, computer program product, and system for optimizing aggregate queries are provided. The method, computer program product, and system provide for receiving an aggregate query comprising a GROUP BY operation and an aggregate function, creating an access plan for executing the aggregate query, the access plan including a join between an outer relation and an inner relation, and designating the join included in the access plan as an early out join.
摘要:
A method and system for collecting statistics on database tables. In one embodiment, the method includes identifying a plurality of tables for statistics collection, wherein each table of the plurality of tables are remote tables; examining at least one attribute for each table identified for statistics collection; prioritizing the tables for statistics collection based on the at least one attribute; and collecting statistics on the identified tables in a priority sequence.