摘要:
Methods, systems, and computer program products are provided for executing database rollup queries. Methods can include iterating through a database table which has been grouped and ordered on the different columns which are in the ROLLUP clause. In some embodiments, a GROUP BY ROLLUP construct can be executed while only requiring an additional one storage location per ordered column per each aggregate function to be performed on each database row. The higher level aggregate functions can be executed without relying on accessing any lower level aggregate results in some embodiments. A suitably grouped and ordered database table can have a multiple level hierarchical ROLLUP function executed in a single pass without having to retrieve lower level aggregate results.
摘要翻译:提供方法,系统和计算机程序产品用于执行数据库汇总查询。 方法可以包括遍历已经在ROLLUP子句中的不同列上分组和排序的数据库表。 在一些实施例中,可以执行GROUP BY ROLLUP构造,同时仅在每个数据库行上执行每个聚合函数需要每个排序列的附加一个存储位置。 在一些实施例中,可以不依赖于访问任何较低级别的聚合结果来执行较高级别的聚合函数。 适当分组和排序的数据库表可以具有在单次通过中执行的多级分层ROLLUP功能,而不必检索较低级别的聚合结果。
摘要:
A database management system predicts a selectivity for database query conditions requiring a join of records from different tables. The system identifies at least one skewed value in a field specified in the join condition, and constructs, for each skewed value, a set of hypothetical query predicates in which the field specified in the join condition is replaced with a constant equal to the skewed value. The system then predicts the selectivity for the hypothetical predicates, using any appropriate prediction technique. The selectivities of the hypothetical predicates are used to predict a selectivity for the original query.
摘要:
A query optimizer optimizes a query to a partitioned database table by determining common characteristics of the partitions and generating a virtual maintained temporary index that spans multiple partitions. Using the virtual maintained temporary index allows the query optimizer to generate an access plan based on the virtual maintained temporary index, which relieves the optimizer from having to individually optimize access to each partition for partitions that share common characteristics.
摘要:
Methods, apparatus, and products are disclosed for caching an access plan for a query that include: receiving, in a SQL module of a DBMS, a SQL query that specifies data for retrieval from a database, the database characterized by database statistics, the SQL query characterized by one or more host variable values; generating, by the SQL module, an access plan in dependence upon the SQL query; calculating, by the SQL module, a routing code for the SQL query in dependence upon the host variable values of the SQL query and a portion of the database statistics; and storing, by the SQL module, the access plan in an access plan cache, including associating with the access plan the routing code for the SQL query and the portion of the database statistics used to calculate the routing code.
摘要:
A database management system predicts a selectivity for database query conditions requiring a join of records from different tables. The system identifies at least one skewed value in a field specified in the join condition, and constructs, for each skewed value, a set of hypothetical query predicates in which the field specified in the join condition is replaced with a constant equal to the skewed value. The system then predicts the selectivity for the hypothetical predicates, using any appropriate prediction technique. The selectivities of the hypothetical predicates are used to predict a selectivity for the original query.
摘要:
A database query optimizer includes an access plan storage mechanism that stores execution detail corresponding to a query statement in an access plan cache. By storing execution detail in the access plan cache along with the query statement, the execution detail is available when needed to debug database problems, even after a problem occurs. The execution detail stored in the access plan cache may be mined and analyzed after-the-fact, producing a very powerful tool for debugging database problems. Snapshots of the execution detail may also be created by a user. In addition, the user may setup autonomic snapshots and comparisons so that a user may be alerted from a degradation in database performance between two snapshots.
摘要:
Methods, systems, and products are provided for code path tracking. Embodiments include identifying an instrumented trace point in software code to be path tracked; identifying a function executed at the instrumented trace point in the software code; identifying parameters for the function executed at the instrumented trace point; and recording a description of the function, the parameters, and the result of the execution of the function using the parameters.
摘要:
A process combines multiple grouping sets into single rollup sets with depth lists defining the levels of grouping that must be performed. Grouping sets are identified that are contained within other sets and combined into single rollups with depth lists. Cube aggregation conversion to rollup aggregation is provided for optimizing database query processing. Natural sets of rollup hierarchies within a cube are recognized and the cube is converted into those rollup hierarchies. Once converted, the rollup aggregation is performed to significantly reduce required processing.
摘要:
A database management system predicts a selectivity for database query conditions requiring a join of records from different tables. The system identifies at least one skewed value in a field specified in the join condition, and constructs, for each skewed value, a set of hypothetical query predicates in which the field specified in the join condition is replaced with a constant equal to the skewed value. The system then predicts the selectivity for the hypothetical predicates, using any appropriate prediction technique. The selectivities of the hypothetical predicates are used to predict a selectivity for the original query.
摘要:
A method, apparatus, and program product are provided for preserving a query plan cache on a backup system having a dataspace containing a copy of data and a copy of a query plan cache from a production system. An update is initiated of at least a portion of the copy of the data on the backup system with a portion of the data on the production system. A merge is initiated of updated query plans in the query plan cache from the production system with corresponding query plans in the copy of the query plan cache on the backup system. Objects are correlated in the updated query plans in the copy of the query plan cache with the updated copy of the data on the backup system.