摘要:
The disclosed embodiments relate to a system for refreshing a table to produce a refreshed table. The system may include a refresh log that may contain a plurality of entries that each comprise an epoch identifier. The system may also include a refresh manager that may be adapted to perform a refresh operation on the table using entries that have corresponding epoch identifiers.
摘要:
There is provided a computer-implemented method of optimizing a query. An exemplary method comprises determining a maximum cardinality for an operator. The query may comprise the operator. The exemplary method also comprises determining a plurality of potential implementations for the operator. The exemplary method additionally comprises generating a query plan for the query based on the maximum cardinality and the potential implementations.
摘要:
A system and method for providing parallel result streams for database queries is provided. The system includes a network including a client, a server, and a database. The client executes an application and sends a query to the server. In response, the server compiles the query to produce a query plan, executes statements in the query plan and sends parallel result streams to the client.
摘要:
A system and method for optimizing a database query with improved performance enhancements is herein disclosed. The database query consists of one or more logical expressions. Through the repeated application of one or more rules, the logical expressions are transformed into physical expressions and in some cases, execution plans that implement the database query. Each expression has associated with it a set of group attributes that specifies its characteristic inputs and outputs and a cost that estimates the computational expense for executing the expression. The group attributes are used to categorize similar expressions into groups that are stored in a search data structure. They are also used to track duplicate expressions. The cost associated with an expression is used to guide the search process to consider those expressions that will produce low cost plans. The cost is estimated in accordance with a six-fold criteria with each criterion weighted to account for the context of the expression and the application's particular computing environment. The query optimizer is rule-based including transformation and implementation rules that are used to perform transformations on the logical expressions in a subproblem in order to produce a plan. A OnceGuidance guidance method is used to select a set of rules in certain cases that prevent the regeneration of an existing expression.
摘要:
There is provided a computer-implemented method of optimizing a query. An exemplary method comprises receiving a first query configured to generate a result set. The query may comprise an operation for an outer table, a first predicate, and a second predicate. The second predicate may comprise a subquery correlated to the operation. Additionally, the first predicate and the second predicate may be disjunctive. The exemplary method also comprises generating a first query tree representing the first query, and generating a second query tree representing a second query. The second query may be configured to generate the result set, and may not comprise the subquery. The exemplary method additionally comprises generating a query plan based on the second query tree.
摘要:
The SQL compiler and SQL executor in a database management system are extended to process queries requiring streaming mode processing of data stored in a table. A scan operator performs table access functions during execution of the streaming mode query. The scan operator first performs an initial scan to access rows in a specified database table, and then performs a delta scan to access new rows added to the table, as well as rows modified by other queries. The scan operator continues to process new data added to the table until the initiating user or application closes the associated cursor. A set of data structures are provided to keep track of active scan operators, including a session control block that includes fields for keeping track of whether the scan operator is performing an initial scan or a delta scan. The session control block also includes, for streaming mode scan operators, a delta scan list of new and modified rows to be processed in the delta scan. When a transaction terminates, any streaming mode scan operators whose operation was suspended because of rows locked by the transaction are automatically rescheduled for execution.
摘要:
The SQL compiler and SQL executor in a database management system are extended to process queries requiring streaming mode processing of data stored in a table. A scan operator performs table access functions during execution of the streaming mode query. The scan operator first performs an initial scan to access rows in a specified database table, and then performs a delta scan to access new rows added to the table, as well as rows modified by other queries. The scan operator continues to process new data added to the table until the initiating user or application closes the associated cursor. A set of data structures are provided to keep track of active scan operators, including a session control block that includes fields for keeping track of whether the scan operator is performing an initial scan or a delta scan. The session control block also includes, for streaming mode scan operators, a delta scan list of new and modified rows to be processed in the delta scan. When a transaction terminates, any streaming mode scan operators whose operation was suspended because of rows locked by the transaction are automatically rescheduled for execution.
摘要:
A system and method for optimizing a database query with improved performance enhancements is herein disclosed. The database query consists of one or more logical expressions. Through the repeated application of one or more rules, the logical expressions are transformed into execution plans. The query optimizer partitions the database query into one or more subproblems with each subproblem consisting of one or more logical expressions. A plan is obtained for each subproblem with the plan for the database query including the plans for each subproblem. The query optimizer is cost-based and uses rules including transformation and implementation rules that are used to perform transformations on the logical expressions in a subproblem in order to produce a plan. The rules are classified into context-free and context-sensitive in order to avoid generating duplicate expressions. Context-free rules are applied once for each logical expression and context-sensitive rules are applied once for each logical expression for a particular optimization goal. In a preferred embodiment, the query optimizer performs several optimization passes over the database query in order to obtain an optimal plan. For each pass, if no optimal plan exists for the requested optimization goal, existing plans having the same optimization goal are utilized with each input reoptimized for a more cost effective plan.
摘要:
An enterprise data warehouse or business intelligence system having a plurality of processors and memory resources. The system includes at least a database server, a workload management system, a query compiler, and a query executor. The database server configured to receive a database query from an application at a database client system. The query compiler configured to prepare the execution plan for the query and compute the number of executive server processes (ESPs) in each ESP layer of the query. The workload management system is configured to generate an affinity value, and the query executor is configured to execute the query. As disclosed herein, placement of the executive server process layers of the query onto processors of the computing system is determined using the affinity value. Other embodiments, aspects and features are also disclosed.
摘要:
Embodiments of the present invention are directed to query-optimization methods and systems that employ risk premiums assigned to database operations in order to increase the robustness and reliability of the evaluation and selection of query-execution plans for executing high-level database queries. Using risk-premium estimates, selection of query-execution plans that include potentially inefficient database operations and inefficient database-operation-execution sequences, often selected by currently available query-optimization methods and systems, are avoided.