摘要:
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.
摘要:
The invention herein provides method and apparatus, including software for determining a set of materialized views or indices of the contents or a subset of the contents of a database in a data processing system to be created for one or more users of the database. The method and apparatus provide method and means for evaluating a workload presented by a user to the database; evaluating the data processing system characteristics; evaluating the database characteristics; and, using the above evaluations for recommending a set of suitable materialized views or indices to the user. Another aspect of the invention, which may be used for a workload presented by a user of a database in a data processing system, provides method and apparatus, including software for determining a set of materialized views or indices of the contents or a subset of the contents of the database, by: generating a plurality of materialized view candidates from evaluation of the workload, data processing system characteristics and database characteristics; estimating statistics for the materialized view candidates such as the number of rows, row size, and column statistics; generating a plurality of potential index candidates by evaluating the workload, data processing system characteristics, database characteristics and the materialized view candidates; and, from the materialized view candidates and index candidates selecting a set of suitable materialized views and/or indices for submission to the user.
摘要:
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.
摘要:
A system and method transform queries with subqueries, using window aggregation. An optimizer in a relational database management system transforms queries to optimize their efficiency and speed. The method transforms queries that have a subquery, replacing the subquery with a window aggregation function. In the case of a correlated subquery, the window aggregation function is partitioned by a correlated column of a correlated table. All data in the main select clause, or outer block, of the query that was obtained through references to the correlated table is instead obtained through the new window aggregation subquery. By using window aggregation, the aggregation is performed at the same time as the selection of relevant data from the correlated table, thereby compiling all needed data in a single pass through the table or view. Reducing the number of times that tables or views are accessed reduces the computational demands of a query.
摘要:
A system for use with an information retrieval system, in which system is used for transforming a database statement containing a first subquery and a second subquery joined together, the first subquery including a group by operation over a child subquery, the information retrieval system comprising means for removing the first subquery from the database statement thereby eliminating the join between the first subquery and the second subquery.
摘要:
Disclosed is an apparatus and system for reducing locking in materialized query tables (MQT) for distributive functions. The apparatus includes an insert module that inserts into an MQT table a child record when a new record is inserted into a base table associated with the MQT. The child record includes values associated with the insert operation. Also included is a delete module that inserts into the MQT a child record that includes measure values that are the negative of the measure values in the base table row that is the subject of the delete operation. An update module inserts two child rows into the MQT, one negating the affected record and the other adding the values of the update operation. Each inserted child row includes a unique identifier that relates the inserted row to a parent row. An execution module generates responses using the values indicated by the cumulative records in a family.
摘要:
An optimized query processing system and method for a database system. The database system includes a table of data and an index correlated to both the query and to the table. The optimized query processing system includes an index accessing module adapted to access the index to determine if the table contains an entry satisfying a query predicate; and a tablescan module for scanning substantially the entire table and retrieving data satisfying the query. A method is also disclosed for generating database diagnostic data.
摘要:
Disclosed is a data processing system implemented method, a data processing system, and an article of manufacturing for use with the data processing system. The data processing system implemented method is used for directing the data processing system to join rows associated with a column of a source table with rows associated with a column of a target table. The data processing system includes a source node containing the source table and including a target node containing the target table. The method includes generating a reduced representation of selected rows associated with the column of the source table, and generating a representation of the column of the target table, filtering the generated reduced representation of selected rows associated with the column of the source table through the generated representation of the column of the target table, the filtered generated reduced representation of selected rows identifying source table rows that do not have to be joined with the target table, and joining, to the rows associated with the column of the target table, the rows associated with the column of the source table minus the filtered generated reduced representation of selected rows.