摘要:
Systems and methods to indicate whether to store a database query language module in a local directory or a global directory are disclosed. An application program can be created once, tested once, and deployed in separate environments. The database query language modules can be shared among a group of application programs running in a common environment. Separate query language modules can be maintained for each environment.
摘要:
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 structured query language (SQL) grouping and aggregation system and method that incorporates hash-based techniques, several overflow handling strategies and statistics-based process-selection criteria. The method can execute SQL group-by queries on distributed database tables or tables stored locally to the database management system (DBMS) processor executing the grouping method. Hash-based techniques allow groupings and aggregates to be generated on the fly through the use of partial aggregates maintained in primary memory. Where primary memory is limited, groups and aggregates are still generated for as many groups as can be maintained in primary memory, while various overflow procedures are provided for buffering ungrouped data and writing that data to an overflow disk file for later processing. In one overflow procedure, raw data from groups that cannot be aggregated in primary memory are buffered then written to the overflow disk file. In a second overflow procedure, ungroupable raw data is formatted the same as data being aggregated in the group table, buffered, and then written to the overflow file. In a third overflow procedure, ungroupable raw data is partially aggregated in an output buffer maintained in primary memory before being written to the overflow file maintained in secondary memory. Database table statistics maintained by a cataloger are consulted to determine whether hash-based grouping or conventional sort based grouping should be used to execute a group-by query. The system is adaptable to running a grouping query against a partitioned database on distributed processors.
摘要:
Systems and methods to indicate whether to store a database query language module in a local directory or a global directory are disclosed. An application program can be created once, tested once, and deployed in separate environments. The database query language modules can be shared among a group of application programs running in a common environment. Separate query language modules can be maintained for each environment.
摘要:
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.
摘要:
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 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.