Computer-implemented method, computer program, and system (predictive query processing)

By predicting input variable values for query statements and selecting access paths accordingly, the method optimizes database query execution, addressing the limitations of existing systems that rely on bound-time cost analysis.

JP7719572B2Active Publication Date: 2025-08-06INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022071984
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-04-26
Filing Date
2022-04-25
Publication Date
2025-08-06
Estimated Expiration
2042-04-25

AI Technical Summary

Technical Problem

Existing database management systems select access paths for query execution based on cost analysis during bound-time processing, which does not account for the variability of input variable values determined at runtime, leading to suboptimal performance.

Method used

Predict input variable values for query statements using predictive models and select access paths based on these predictions to optimize runtime execution.

Benefits of technology

Improves query execution performance by selecting access paths that are likely to exhibit optimized performance, reducing variability and enhancing database response time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007719572000005
    Figure 0007719572000005
  • Figure 0007719572000006
    Figure 0007719572000006
  • Figure 0007719572000007
    Figure 0007719572000007
Patent Text Reader

Abstract

To provide a computer implementation method, a computer program and a system (prediction query processing), capable of improving selection of an access path.SOLUTION: A method includes: a stage 3002 of receiving an incoming query statement including a query statement expression including input variables; a stage 3004 of predicting input variable values related to the input variables; a stage 3010 of selecting an access path for run time execution of the incoming query statement depending on the predicted input variable values; and a stage of using the selected access path to carry out the run time execution of the incoming query statement.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] A database may be defined by an organized collection of data that is accessed electronically by a computer system. A database may have an associated database management system (DBMS). The data in a database may be organized in a series of tables having rows and columns of data. A database table may in turn include one or more indexes. An index may be provided by a data structure that improves access to a database table.

[0002] Structured Query Language (SQL) is a domain-specific language used for programming data management in database management systems (DBMS). SQL query statements can be used to perform various database operations, such as INSERT, UPDATE, SELECT, and DELETE query operations. The INSERT operation can be used to perform entering records into a database table, the SELECT operation can be used to retrieve data from a database table, the UPDATE operation can be used to change values in a database table, and the DELETE operation can be used to remove data from a database table.

[0003] SQL can be used to program and manage data in a relational data structure management system (RDSMS). SQL can be used to process structured data, where relationships are defined between different entities and / or variables of data. SQL can include various sub-languages, including Data Query Language (DQL), Data Definition Language (DDL), Data Control Language (DCL), and Data Manipulation Language (DML). Using SQL, various operations can be performed on a database, including, for example, data queries, data manipulation (insert, update, or delete, or a combination thereof), data definition (schema creation and modification), and data access control.

[0004] Data structures are used to improve the operation of computer systems. Data structures refer to the organization of data in a computer environment for improved computer system operation. Data structure types include containers, lists, stacks, queues, tables, and graphs. Data structures are used to improve the operation of computer systems in terms of, for example, algorithm efficiency, memory utilization efficiency, maintainability, and reliability.

[0005] Artificial intelligence (AI) refers to intelligence exhibited by machines. Artificial intelligence (AI) research includes search and mathematical optimization, neural networks, and probability. Artificial intelligence (AI) solutions include features derived from research in a variety of different scientific and technological domains, ranging from computer science, mathematics, psychology, linguistics, statistics, and neuroscience. Machine learning has been described as the field of study that gives computers the ability to learn without being explicitly programmed. Summary of the Invention [Problem to be solved by the invention]

[0006] The selection of an access path may be improved by using a method that includes predicting input variable values of a query statement that are related to the input variables of the query statement. [Means for solving the problem]

[0007] In one aspect, shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method that may include, for example, receiving an incoming query statement, the incoming query statement including a query statement expression that includes input variables, predicting input variable values associated with the input variables, selecting an access path for runtime execution of the query statement dependent on the predicted input variable values, and performing the runtime execution of the query statement using the selected access path.

[0008] In another aspect, a computer program product may be provided. The computer program product may include a computer-readable storage medium readable by one or more processing circuits and storing instructions for execution by one or more processors to perform a method. The method may include, for example, receiving an incoming query statement, the incoming query statement including a query statement expression including input variables, predicting input variable values associated with the input variables, selecting an access path for runtime execution of the query statement dependent on the predicted input variable values, and performing the runtime execution of the query statement using the selected access path.

[0009] In a further aspect, a system may be provided. The system may include, for example, a memory. Further, the system may include one or more processors in communication with the memory. Further, the system may include program instructions executable by the one or more processors via the memory to perform a method. The method may include, for example, receiving an incoming query statement, the incoming query statement including a query statement expression that includes input variables; predicting input variable values associated with the input variables; selecting an access path for runtime execution of the query statement dependent on the predicted input variable values; and performing the runtime execution of the query statement using the selected access path.

[0010] In one aspect, the shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method, which may include, for example, receiving an incoming query statement, the incoming query statement including a query statement expression that includes input variables, selecting an access path for runtime execution of the query statement, performing the runtime execution of the query statement using the selected access path, where performing the runtime execution of the query statement includes determining input variable values for the input variables, applying the determined input variable values as training data for training a predictive model, the predictive model being configured to return predictions for input variable values associated with the input variables, receiving a subsequent instance of the incoming query statement, the incoming query statement including a query statement expression that includes input variables, querying the predictive model to predict input variable values for the input variables in the subsequent instance of the incoming query statement, selecting an access path for runtime execution of the subsequent instance of the query statement that depends on the predicted input variable values, and performing the runtime execution of the subsequent instance of the query statement using the selected access path.

[0011] In another aspect, a computer program product may be provided. The computer program product may include a computer-readable storage medium readable by one or more processing circuits and storing instructions for execution by one or more processors to perform a method. The method may include, for example, receiving an incoming query statement, the incoming query statement including a query statement expression that includes input variables; selecting an access path for runtime execution of the query statement; performing the runtime execution of the query statement using the selected access path, the performing the runtime execution of the query statement including determining input variable values for the input variables; applying the determined input variable values as training data for training a predictive model, the predictive model being configured to return predictions for input variable values associated with the input variables; receiving a subsequent instance of the incoming query statement, the incoming query statement including a query statement expression that includes input variables; querying the predictive model to predict input variable values for the input variables in the subsequent instance of the incoming query statement; selecting an access path for runtime execution of the subsequent instance of the query statement dependent on the predicted input variable values; and performing the runtime execution of the subsequent instance of the query statement using the selected access path.

[0012] In a further aspect, a system may be provided. The system may include, for example, a memory. Further, the system may include one or more processors in communication with the memory. Further, the system may include program instructions executable by the one or more processors via the memory to perform a method. The method may include, for example, receiving an incoming query statement, the incoming query statement including a query statement expression that includes input variables; selecting an access path for runtime execution of the query statement; performing the runtime execution of the query statement using the selected access path, the performing the runtime execution of the query statement including determining input variable values for the input variables; applying the determined input variable values as training data for training a predictive model, the predictive model being configured to return predictions for input variable values associated with the input variables; receiving a subsequent instance of the incoming query statement, the incoming query statement including a query statement expression that includes input variables; querying the predictive model to predict input variable values for the input variables in the subsequent instance of the incoming query statement; selecting an access path for runtime execution of the subsequent instance of the query statement dependent on the predicted input variable values; and performing the runtime execution of the subsequent instance of the query statement using the selected access path.

[0013] Additional functionality is enabled by the techniques described herein. Other embodiments and aspects, including but not limited to methods, computer program products, and systems, are described in detail herein and are considered a part of the claimed invention. [Brief explanation of the drawings]

[0014] One or more aspects of the invention are particularly pointed out and distinctly claimed as examples in the claims at the conclusion of this specification. The foregoing and other objects, features, and advantages of the invention will become apparent from the following detailed description taken in conjunction with the accompanying drawings.

[0015] [Figure 1] 1 illustrates a system having a database system, an administrator system, an enterprise system, and an administrator client computing device according to one embodiment.

[0016] [Figure 2] 1 is a flowchart illustrating a method for performance by interacting database systems according to one embodiment.

[0017] [Figure 3] 1 is a flowchart illustrating a method for performance by a database system according to one embodiment.

[0018] [Figure 4] 1 illustrates an example of trends that may be exhibited by a database table in response to multiple iterations of processing a query statement, according to one embodiment.

[0019] [Figure 5] 1 illustrates a predictive model, according to one embodiment.

[0020] [Figure 6] 1 illustrates the output from a discrete Fourier transform analysis, according to one embodiment.

[0021] [Figure 7] 1 illustrates an example time series defined by runtime-determined input variable values over successive runtime executions of a query statement.

[0022] [Figure 8]1 illustrates comparison data describing output predictions of a predictive model trained to predict input variable values for input variables of a query statement as compared to ground truth data defined by holdout data, according to one embodiment.

[0023] [Figure 9] 1 illustrates a computing node according to one embodiment.

[0024] [Figure 10] 1 illustrates a cloud computing environment according to one embodiment.

[0025] [Figure 11] 1 illustrates an abstraction model layer according to one embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0026] FIG. 1 illustrates an embodiment of a system 100 for use in improving database response time. According to one embodiment, the system 100 may include an administrator system 110 with an associated data repository 108, enterprise systems 120A-120Z, an administrator client computing device 130, and a database system 140. According to one embodiment, the administrator system 110, enterprise systems 120A-120Z, the administrator client computing device 130, and the database system 140 may be provided by computing node-based devices and systems and may communicate with each other via a network 190. The network 190 may be a physical network, a virtual network, or both. A physical network may be a physical telecommunications network connecting multiple computer nodes or systems, such as, for example, computer servers and computer clients. A virtual network may, for example, aggregate multiple physical networks or portions thereof into a logical virtual network. In another example, multiple virtual networks may be defined across a single physical network.

[0027] According to one embodiment, each of administrator system 110, enterprise systems 120A-120Z, administrator client computing devices 130, and database system 140 may be located external to one another, e.g., located on different computing nodes, such as different physical computing nodes. According to one embodiment, one or more of administrator system 110, enterprise systems 120A-120Z, administrator client computing devices 130, and database system 140 may be located on at least one of administrator system 110, enterprise systems 120A-120Z, administrator client computing devices 120, or database system 140.

[0028] According to one embodiment, database system 140 may be provided by a Structured Query Language (SQL) database system capable of responding to SQL-based query statements. In the course of using system 100, database system 140 may receive queries from one or more of enterprise systems 130A-130Z. The queries received by database system 140 may take the form of query statements, such as SQL statements. Database system 140 may include database 136 and database management system (DBMS) 1400. Database 136 may include tables 3121 and indexes 3122. Tables 3121 may logically organize data into columns and rows of data. A row of data within a table may define a record. Each table in tables 3121 may have zero or more indexes 3122 associated with it.

[0029] Embodiments herein recognize that, using existing approaches for processing query statements, an access path to be used in performing runtime execution processing may be selected prior to the time of determining input variable values for the query statement associated with input variables of the query statement. The selection of multiple candidate access paths may be subject to a cost analysis in which the candidate access paths may be scored. Embodiments herein recognize that the selection of an access path may be improved by using a method that includes predicting input variable values for the query statement associated with input variables of the query statement. According to one embodiment, DBMS 1400 may be configured to (a) predict input variable values for the query statement associated with input variables of the query statement, and (b) select an access path from the candidate access paths dependent on the predicted input variable values for the query statement. According to one specific embodiment, DBMS 1400 may be configured to: (a) predict input variable values of a query statement associated with input variables of the query statement; (b) select filter factors to be used in scoring candidate access paths depending on the predicted input variable values of the query statement; (c) perform cost scoring of the candidate access paths using the applied filter factors; and (d) select an access path from the candidate access paths based on the cost scoring.

[0030] An access path may be characterized by one or more of: (a) an access method characteristic; (b) a join order characteristic; (c) a join method characteristic; and / or (d) a sort selectivity characteristic.

[0031] (a) The access method characteristic may refer to the manner in which a base table is accessed. According to one embodiment, there may be two methods: (1) Table scan (relational scan): This may refer to scanning records from this base table from the first row to the last row and picking up rows that qualify the predicate specified in the SQL. (2) Index scan: This may refer to using an index to access records in a base table. According to one embodiment, a database performing a table scan may, for example, read all rows of a table and apply one or more selection criteria to the rows in the table. The rows in a table may be processed in a non-guaranteed order, but are typically processed sequentially. For certain query statement values, a table scan may reduce page I / O operations by asynchronously prefetching rows. According to one embodiment, a production database may require large I / Os to bring as many rows as possible into main memory for processing and may asynchronously prefetch data to ensure that the table scan operation does not wait for rows to be paged into memory. With an index scan, the database may access an index to reduce the set of qualifying rows, for example, by scanning the rows within a specified range of the index. When scanning the rows within a specified range of the index, the production database may determine the range of the index scan depending on the values in the query statement to which the index columns are being compared. In the case of an index-only scan, the production database does not need to access the indexed table because all of the requested data is in the index.

[0032] (b) The join order property may refer to the join 'order' of a join of two base tables, for example an inner join or an outer join.

[0033] (c) The join method characteristic may refer to the manner in which two tables are connected during the join. According to one embodiment, the join method may include, for example, a nested loop join, a merge sort join, a hybrid join, or a hash join, or a combination thereof. FIG. 6 illustrates a nested loop join as an example. With a nested loop join, for example, a scan of the inner table may be performed for each accessed row of the outer table, or an index lookup on the inner table may be performed for each accessed row of the outer table.

[0034] (d) Sorting characteristics may refer to sorting operations within a database. Examples may include, for example, GROUP BY and ORDER BY operations.

[0035] A query statement processed by DBMS 1400 may include one or more input variables that are replaced by input variable values during runtime execution of the query statement. Input variables may be provided by host variables or parameter markers. A query statement may include static query statements, dynamic query statements, or both. A static query statement may include input variables provided by host variables, and a dynamic query statement may include input variables provided by parameter markers. A host variable may refer to a variable in a host language, such as a PL / I variable, a C variable, a Fortran variable, a REXX variable, a Java variable, a COBOL data item, or an assembler language storage area. A host variable may refer to a host language construct generated by an SQL precompiler from variables declared using SQL extensions, for example. An application may associate parameter markers with application variables. A parameter marker may be provided by a placeholder in a query statement whose value is obtained during statement execution.

[0036] An exemplary query statement is set forth in Table A below. [Table A] [Table 1]

[0037] In the example of Table A, the query statement expressions "AND O_ORDERDATE>=?", "AND O_ORDERDATE<?", and "AND L_RETURNFLAG=?" each include an input variable that is replaced with an input variable value determined during the runtime execution of the query statement of Table A.

[0038] Embodiments herein may include predicting input variable values for one or more query statements of a query statement and selecting an access path for runtime execution of the query statement that depends on the input variable values of the query statement. Embodiments herein may include predicting input variable values for one or more query statements of a query statement prior to runtime execution of the query statement and selecting an access path for runtime execution of the query statement that depends on the input variable values of the query statement. Embodiments herein may include predicting input variable values for one or more query statements of a query statement prior to determining the input variable values for one or more query statements during runtime execution of the query statement and selecting an access path for runtime execution of the query statement that depends on the input variable values of the query statement.

[0039] Embodiments herein recognize the problems with existing approaches to processing query statements. According to one existing approach to processing query statements, a database system may establish an access path to be used in performing runtime execution processing based on a cost analysis during bound-time processing to analyze different generated access path candidates. In the case of a static query statement, according to the existing approach, a production database may perform bound-time processing to establish an access path in response to a first reception of a particular static query statement, and may use the established access path to perform runtime execution in response to subsequent reception of the particular static query statement. In the case of a dynamic query statement, according to the existing approach, a database may perform bound-time processing to establish an access path in response to a first reception of a particular dynamic query statement and each subsequent reception of the particular dynamic query statement. Whether processing a static query statement or a dynamic query statement, a production database according to the existing approach may establish an access path during bound-time processing and execute the query statement according to the established access path during runtime processing.

[0040] Embodiments herein recognize that although input variable values of a query statement may be unknown during bound-time processing, performance of an established access path may vary significantly for different input variable values of the query statement that are determined and returned after runtime for runtime execution of the query statement. Embodiments herein recognize that access path selection for selecting an optimized access path may be significantly improved by predicting input variable values prior to their determination during runtime execution and selecting an access path for runtime execution of the query statement that depends on the predicted input variable values. Embodiments herein recognize that selecting an access path that depends on the predicted input variable values may result in an access path being selected that is likely to exhibit optimized performance.

[0041] DBMS 1400 may execute various processes, including a query processing process 141 for processing query statements and a logging process 142. The DBMS 1400 executing the query processing process 141 for processing query statements may include a DBMS 1400 that performs bound-time processing of the query statements and performs runtime execution processing of the query statements. In performing bound-time processing of the query statements, DBMS 1400 may select an access path for executing the query statement depending on predicted input variable values for the query statement. To predict the input variable values of the query statement, DBMS 1400 may identify the query statement and associated input variables and query a predictive model associated with the query statement and the associated input variables for returning predicted input variable values. To identify the query statement, DBMS 1400 may perform examining metadata associated with the query statement. Examining the metadata may include cross-referencing the metadata of the incoming query statement to the query statement identifying metadata in DBMS 1400's data repository 138.

[0042] The data repository 138 of the DBMS 1400 may be a logical data repository that may store various data, including data used in processing query statements. The data repository 138 in the query statement field 3131 may store identifying metadata identifying past query statements that have been processed by the data repository 138. During the evolution of the database system 140, it may be expected that a common query statement may be processed hundreds, thousands, or even more times. During its operation, the database system 140 may, for example, simultaneously process tens, hundreds, or thousands of different query statements. The metadata identifying the query statement may include, for example, any assigned identifying label, or a schema signature identifier extracted by inspection of the query statement's schema, or both. Associated with each instance of the metadata identifying a unique query statement in the query statement field 3131 may be stored attribute data specifying attributes of the identified query statement. The attribute data may include, for example, an identifier for one or more input variables of the query statement and an identifier for a predictive model associated with the one or more input variables.

[0043] In model area 3132, data repository 138 may store trained and active predictive models associated with a query statement expression that includes input variables. The trained and active predictive models stored in model area 3132 may predict input variable values of a query statement associated with the input variables of the query statement expression. System 100 may be operable such that administrator system 110 for training predictive models to predict host variable values determined to be active and to perform predictions according to an accuracy threshold may push active predictive models to database system 140 for storage in data repository 138.

[0044] In logging area 3133, data repository 138 may store logging data retrieved from past executions of query statements. The logging data may include past input variable values associated with the query statements. The logging data may also include statistical logging data indicating, for example, the size of tables over time, the size of response data sets returned from executions of the query statements, and the identifiers of past table records returned from past executions of the query statements.

[0045] In decision data structures area 3134, data repository 138 may store decision data structures used by DBMS 1400 in evaluating received query statements. Examples of such decision data structures may include mapping decision data structures that facilitate cost scoring of candidate access paths. Such mapping decision data structures may include mapping decision data structures that map query statement expressions to values of filter factors.

[0046] Upon identifying the query statement and one or more associated input variable values, DBMS 1400, when executing query processing process 141 for processing an incoming query statement, may examine model area 3132 of data repository 138 to identify any active predictive models for the query statement that may return predictions for one or more input variable values of the query statement. Upon identifying active predictive models that predict the input variable values of the query statement, DBMS 1400 may query the active predictive models that return predicted input variable values of the query statement associated with the input variables. DBMS 1400 may then select an access path for executing the query statement that depends on the input variable values of the predicted query statement associated with the input variables.

[0047] In one specific embodiment, DBMS 1400 may perform cost scoring of each candidate access path using the predicted input variable values and may select one of the candidate access paths for execution of the query statement depending on the score.

[0048] Once the DBMS 1400 executing the query processing process 141 selects an access path, it may perform runtime execution of the query statement using the selected access path.

[0049] The DBMS 1400 executing the logging process 142 may generate logging data regarding the executing query statements executed by the DBMS 1400. The logging data for each query statement processed by the DBMS 1400 may include input variable values associated with the input variables of the query statement. The logging data may also include statistical logging data indicating, for example, the size of a table over time, the size of a response data set returned from execution of the query statement, and the identifiers of past table records returned from past executions of the query statement. The DBMS 1400 executing the logging process 142 may store the generated logging data in the logging area 3133 of the data repository 138 and may push selected logging data to the administrator system 110 for use by the administrator system 110 in training a predictive model that predicts input variable values for query statements associated with the input variables. The DBMS 1400 executing the logging process 142 may include the DBMS 1400 repeatedly sending the logging data generated by the logging process 142 for processing by the administrator system 110. DBMS 1400 executing logging process 142 may transmit logging data to administrator system 110 at time intervals, or alternatively, at the end of execution of each incoming query statement. The logging data transmitted by DBMS 1400 may include logging data specifying, for each of one or more input variables of the query statement, determined input variable values returned by execution of the query statement. The determined input variable values may be determined during runtime execution of the query statement.

[0050] Once the administrator system 110 receives the logging data, the administrator system 110 may use the received logging data to train predictive models. The predictive models trained by the administrator system 110 may include predictive models that predict input variable values of a query statement related to the input variables of the query statement. The administrator system 110, as shown in FIG. 1, may be responsible for training predictive models and pushing active trained predictive models to be used by the database system 140 in performing the query processing process 141 to process the query statements.

[0051] The administrator system 110 in the data repository 108 may include predictive models in a model area 2121 that are to be trained by the administrator system 110. In a decision data structure area 2122, the data repository 108 may store decision data structures used in returning action decisions by the administrator system 110. The action decisions may include, for example, an action decision to activate a predictive model. A predictive model may be activated when the predictive model generates a prediction that meets a threshold level of accuracy.

[0052] The data repository 108 in the logging area 2123 may store logging data specifying input variable values of past query statements associated with input variables for past executions of the query statements. The logging data may include logging data received by the database system 140 from the DBMS 1400 due to performance of the logging process 142 by the DBMS 1400. The administrator system 110 may use the logging data in the logging area 2123 to train predictive models that predict host variable values associated with the input variables of the query statements. The administrator system 110 executing the machine learning process 111 may train predictive models in the model area 2121. Each query statement processed by the database system 140 may include one or more input variables whose host variable values are determined for substitution of the input variables during runtime execution of the query statement. The data repository 108 in the model area 2121 may store a predictive model for each input variable associated with each query statement processed by the database system 140.

[0053] The administrator system 110 executing the machine learning process 111 may iteratively train a described predictive model associated with the input variables of each query statement processed by the database system 140. The administrator system 110 executing the machine learning process 111 may include the administrator system 110 iteratively training each described model using received logging data most recently received from the DBMS 1400. The logging data may include mapping data between input variables of the query statement and input variable values determined from the most recent execution of the query statement processed by the database system 140. The administrator system 110 executing the action decision process 112 may include the administrator system 110 determining that a particular predictive model is returning predictions for input variable values of the query statement that meet a threshold accuracy condition. In performing such an action decision, the administrator system 110 executing the action decision process 112 may test predictions generated by the predictive model against ground truth data defined by holdout data associated with the predictive model.

[0054] The administrator system 110 executing the action decision process 112 may include the administrator system 110 controlling an active / inactive flag status label associated with a predictive model in response to determining whether the predictive model is returning predictions that meet a threshold accuracy condition. The administrator system 110 executing the action decision process 112 may return an action decision in response to determining that the predictive model is generating predictions that meet a threshold accuracy, as may be specified by an active status label associated with the predictive model, and may push the active trained predictive model to the database system 140 for storage in the model area 3132. Once pushed to the database system 140, the database system 140 executing the query processing process 141 may use the active predictive model when processing incoming query statements.

[0055] Referring to the flowchart of FIG. 2 , a method for performance by database system 140 interacting with enterprise systems 120A-120Z and administrator system 110 is described. In block 1201, enterprise systems 120A-120Z may repeatedly transmit transactional query data for receipt by database system 140. The transactional query data transmitted in block 1201 may be defined by query statements from multiple enterprise systems. Upon receiving each query statement, database system 140 may perform query processing block 1401 in block 1401. DBMS 1400 performing the query processing process in block 1401 may include the DBMS performing query processing process 141 described in connection with FIG. 1 . DBMS 1400 in block 1401 may perform bound-time processing and runtime execution of the query statements. In the bound-time processing, DBMS 1400 may score various candidate access paths using cost analysis and select one of the candidate access paths based on the cost analysis. During runtime execution, DBMS 1400 may execute the query statement using the selected access path. As described herein, selecting an access path may be performed depending on predicted query statement input variable values associated with the query statement's input variables. DBMS 1400 may predict one or more input variable values associated with one or more input variables of the query statement during bound-time processing of the query statement and use the predicted input variable values in cost-scoring performance of the candidate access paths. Based on the cost scoring, DBMS 1400 may select an access path from the candidate access paths for runtime execution of the query statement depending on the one or more predicted input variable values.

[0056] 3 shows a flowchart illustrating an example method 3000 by which DBMS 1400 performs bound time processing in query processing block 1401. In block 3002 of method 3000 illustrated in FIG. 3, DBMS 1400 may receive a query statement from an enterprise system of enterprise systems 120A-120Z.

[0057] In block 3004, DBMS 1400 may identify the incoming query statement received in block 3004. According to one embodiment, data repository 138 of database system 140 may store identifying metadata of past query statements processed by DBMS 1400 in query statement field 3131. The metadata may be any assigned metadata assigned to each query statement and / or extrapolated metadata extrapolated by processing the query statement. To identify the incoming query statement, DBMS 1400 may perform an examination of the metadata of the incoming query statement. The examination may include matching the metadata of the incoming query statement to metadata in query statement field 3131 that identifies past query statements. The metadata of the incoming query statement may include assigned metadata assigned to the query statement or extrapolated metadata extrapolated by processing the query statement. The extrapolated metadata may include scheme signature metadata returned by examining the schema of the incoming query statement. Along with identifying the query statement in block 3004, DBMS 1400 may identify one or more input variables for the query statement. Identifying one or more input variables for the identified query statement may include DBMS 1400 retrieving identifiers of the one or more input variables stored in query statement field 3131 of data repository 138.

[0058] Upon identifying a query statement at block 3004, DBMS 1400 may proceed to block 3006. At block 3006, DBMS 1400 may query one or more predictive models associated with the query statement identified at block 3004. In query statement field 3131, data repository 138 may store each identified past query statement data specifying attributes of the query statement, including identification data identifying input variables for the query statement and identifiers for predictive models associated with such input variables stored in model field 3132 for predicting input variable values associated with such query statement. Each query statement may have 1 to N input variables, and a predictive model may be provided within system 100 for each input variable of each query statement. Within data repository 138, for each query statement, query statement field 3131 may store data specifying input variable representations within the query statement.

[0059] In block 3006, DBMS 1400 may query one or more active predictive models associated with the query statement identified in block 3004 to return predicted query statement input variable values for one or more input variables of the query statement. Querying one or more predictive models may include using predictive model query data including a set of context parameter values. The set of context parameter values may specify attributes of a workload associated with the received query statement received in block 3002. The set of context parameter values may be extracted from a message received from an enterprise system including the query statement received in block 3002. An active predictive model herein may refer to a predictive model that is generating predictions within a threshold that meets a level of accuracy. In block 3006, DBMS 1400 may examine an active / inactive flag status for each predictive model associated with each input variable of the incoming query statement and, in response to determining that the flag status is active, selectively query the active predictive models for the respective query statement. In response to determining that the predictive model is generating predictions with a threshold level of accuracy, system 100 may set the flag status of the predictive model to active.

[0060] In response to completion of block 3006, DBMS 1400 may proceed to block 3008. In block 3008, DBMS 1400 may perform cost scoring of multiple candidate access paths. In one aspect, the scoring performance may depend on predicate input variable values. In one aspect, the scoring of multiple access paths may depend on filter factors that may be applied depending on predicted input variable values.

[0061] According to one embodiment, the DBMS 1400 for performing cost scoring associated with each of several candidate access paths may score a total cost associated with each access path. According to one applicable scoring method, the DBMS 1400 for assigning total cost values to candidate access paths may assign a CPU cost factor and an I / O cost factor. Subcomponents of the CPU cost factor may include, for example, a base cost, a page cost, a scan cost, and a row cost. According to the cost mapping decision data structure stored in the decision data structure area 3134, a filter factor assigned to a query statement expression based on predicted input variable values may be used to estimate the number of rows accessed, which may estimate the impact on the base cost, page cost, scan cost, and row cost, and therefore the impact on the CPU cost and I / O cost. Therefore, the filter factor assigned to a query statement expression may affect the total cost assigned to the cost scoring of a candidate access path.

[0062] A predicate in SQL may refer to a true / false condition, such as a WHERE clause or a HAVING clause. SQL predicates may be found in clauses, functions, and at the end of SQL expressions in an existing query statement. In one aspect, a predicate may refer to an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates may be used, for example, in search conditions in WHERE and HAVING clauses, join conditions in FROM clauses, and other constructs where a Boolean value is required.

[0063] A predicate's filter factor may refer to a number between 0.0 and 1.0 that estimates the percentage of rows in a table for which the predicate is true. Those rows are said to be qualified by the predicate. For example, assume a database system may determine that column C1 of table T in database 136 contains only one of five distinct values: A, B, C, D, and E. In the absence of other information, the database system may estimate that one-fifth of the rows contain any one of the possible values A, B, C, D, or E in column C1. Thus, in the described scenario, DBMS 1400, which uses default input variables as filter factors to map data stored in decision data structure area 3134, may assign a filter factor of 0.2 to the predicate C1='X' in table T.

[0064] To further illustrate, a query statement for processing may take the form shown in Table B. [Table B] [Table 2]

[0065] Here, "X" is unknown and may assume values A, B, C, D, or E. In the illustrated scenario where 'X' is unknown, DBMS 1400, which uses default input variables for filter factors mapping decision data structures stored in decision data structure area 3134, may assign a filter factor of 0.2 for predicate C1='X' with unknown variable 'X'. The illustrated default input variables to filter factors mapping decision data structures stored in decision data structure area 3134 may store the following associations: assign a filter factor of 0.2 for any value of C1 where C1='X'. However, embodiments herein recognize that filter factors may be assigned more accurately when the values of the input variables can be accurately predicted.

[0066] In one embodiment, database system 140 may, in the illustrated scenario, determine by examining column C1 of table T in database 136 that filter factors may be assigned for various different possible input variable values of C1='X' according to the different input variable values to filter factors that map data defined by the decision data structure of table C for storage in decision data structure area 3134. [Table C] [Table 3]

[0067] Database system 140 may be configured to iteratively, e.g., periodically, examine tables in database 136 referenced by input variables to iteratively update filter factors for different input variable values that map to a data structure as shown in Table C for each input variable being processed by database system 140. With reference to Table C, DBMS 1400, which uses different input variable values for filter factors that map to a data structure as shown in Table C, may assign a filter factor of 0.75 if C1='A', a filter factor of 0.15 if C1='B', a filter factor of 0.05 if C1='C', a filter factor of 0.03 if C1='D', and a filter factor of 0.02 if C1='E'.

[0068] DBMS 1400 may assign filter factors dependent on predicted input variable values as described in connection with Table C, may use the assigned filter factors to estimate the number of rows in the response dataset of the reference table, and may apply the estimated number of rows to be returned in scoring performance of candidate access paths.

[0069] At block 3008, in response to predicting one or more input variable values for the query statement at block 3006, DBMS 1400 according to one embodiment may apply filter factors for one or more different input variable values determined using a decision data structure characterized according to Table C, rather than using the unknown input variable values as default filter factors (e.g., a filter factor of 0.2 applied to unknown variable C1='X') mapping the decision data structure as described with reference to Table B. Embodiments herein recognize that using different input variable values as filter factors mapping the decision data structure, as described with reference to Table C, may improve access path selection such that the selected access path performs better relative to an access path selected without using different input variable values as filter factors mapping the decision data structure.

[0070] According to one embodiment, database system 140 may perform cost scoring of candidate access paths dependent on detecting table trend characteristics of tables associated with input variables. A table associated with an input variable may refer to a table in which a data set defined by accessed table rows is returned in response to execution of a query statement expression having the input variable.

[0071] In block 3008, DBMS 1400 may determine one or more table propensity classifications for tables accessed by execution of the query statement dependent on the input variable values of the predicted query statement returned in block 3006. In block 3008, DBMS 1400 may examine the predicted response data set returned from the particular table associated with the input variable values using the predicted input variable values returned in block 3006, and compare the resulting response data set with past response data sets for the particular table referenced in logging area 3133 for the previous time slot. In block 3008, DBMS 1400 may examine the table metrics logging data in logging area 3133 to determine table propensity classifications for tables referenced by the incoming query statement being processed, and may use the table propensity classifications in performance cost scoring of candidate access paths and access path selection. The logging data stored in the logging area 3133 of the data repository 138 may include table metrics logging data that specifies past table identifiers and past ranges of table rows returned in response to execution of a query statement having one or more input variables.

[0072] Based on the predicted response data set returned using the predicted input variable values, DBMS 1400 may classify tables referenced by the execution of the query statement expression as having a particular propensity classification or propensity classifications. DBMS 1400 may then perform cost scoring of candidate access paths depending on the predicted input variable values and depending on the determined table propensity classifications.

[0073] Possible table trend classifications may include, for example, filter factor stability, filter factor change, response dataset stability, response dataset change, response dataset size stability, and response dataset size change. A query statement expression having input variables when executed may result in a response dataset defined by table rows (records) returned from a reference table associated with the query statement. As described in connection with FIG. 4 , embodiments herein may use time series data of a response dataset 4004 and a reference table 4002 associated with such response dataset in performing access path selection based on predicted input variable values. The response dataset 4004 shown in FIG. 4 may refer to rows of table data returned from an associated table 4002 depending on the performance of a query statement expression including input variables.

[0074] 4, trends such as table trend A, table trend B, and table trend C may be identified for different tables referenced by different exemplary query statement expressions including respective input variables. Between time t=T-3 and time t=T, the size of the table rows of table 4002 shown in trend A may grow, and the response data set 4004 may stabilize, i.e., the same data set 4004 (within the same specified timestamp range) may be returned for each time slot. In the scenario shown by trend level A, DBMS 1400 may classify the reference table 4002 of the query statement expression associated with trend A as having a stable response data set and a changing (specifically, shrinking) fill factor.

[0075] 4, the table size of the lookup table 4002 may remain constant through advancing time slots, and the size of the reply data set 4004 per time slot may remain consistent across different time slots. In such a scenario, the DBMS 1400 may classify the lookup table 4002 as having a stable size reply data set 4004 and a stable filter factor, as well as a changing reply data set.

[0076] In a scenario indicated by trend level C, DBMS 1400 may classify reference table 4002 as having a stable period, stable filter factor, stable response dataset size, and a changed response dataset 4004. For example, trend C may occur if database system 140 may automatically reduce the row size of table 4002 periodically, e.g., daily. Trend C may be common in banking applications, for example, where transaction data may only be available for a predetermined period, e.g., the last month. In such a scenario, DBMS 1400 may remove one table row from the table each day.

[0077] 4, time slot T may refer to the time slot of the next period associated with the return of the data set predicted by DBMS 1400 using the input variable values of the predicted query statement returned in block 3006. Time slot T-1 may refer to the time slot of the most recent execution of the current query statement for which logging data resides in logging area 3133 of data repository 138. Time slot T-2 and time slot T-3 may refer to the time slot of the next prior execution of the current query statement for which logging data resides in logging area 3133 of data repository 138. In block 3008, DBMS 1400 may examine the table metrics logging data in logging area 3133 to determine a table trend classification for the table referenced by the incoming query statement being processed, and may use the table trend classification in cost scoring performance of candidate access paths and in access path selection.

[0078] As described with reference to Table C, in performing cost scoring of candidate access paths, DBMS 1400 may apply filter factors dependent on predicted input variable values, where the filter factors may be used to estimate the number of returned rows of a reference table, and the estimated number of rows in the dataset may be used in performing scoring of candidate access paths. In one embodiment, as described with reference to FIG. 4, if the number of returned rows may be predicted using table trend classification based on predicted input variable values, DBMS 1400 may directly use the predicted number of rows returned from a table as input to scoring of access paths without specifying a filter factor to convert to a returned row estimate.

[0079] Table D shows a decision data structure that can be used to return an action decision to establish a cost scoring method for candidate access paths that depends on the determined table tendency classification. [Table D] [Table 4]

[0080] Referring to Figure 4 and Table D, the condition in row 1, which results in the application of an access path cost scoring method that includes predicting the number of rows that will be returned (as opposed to estimating the number of rows in the return dataset using a filter factor), may be applied when trend A is detected and a table trend classification associated with trend A is applied, and the condition in row 2, which results in the application of an access path cost scoring method that includes using a filter factor, may be applied when trend B or trend C as described in Figure 4 are detected and a table trend classification associated with trend B or trend C is applied.

[0081] In response to performing cost scoring of the candidate access paths at block 3008 as described herein, DBMS 1400 may proceed to block 3010 to select an access path for performance of runtime execution of the incoming query statement being processed. At block 3010, DBMS 1400 may select the candidate access path having the lowest cost score according to the cost scoring performed at block 3008 as the access path for performance of runtime execution of the incoming query statement being processed.

[0082] Depending on the performance of the cost scoring of the candidate access paths at block 3008 and the selection of an access path for use during runtime execution of the query statement at block 3010, DBMS 1400 may proceed to perform runtime execution of the current query statement. During runtime execution of the query statement, DBMS 1400 may execute the received query statement being processed using the selected access path, which was selected at block 3010 depending on one or more predicted query statement input variable values associated with one or more input variables of the query statement.

[0083] Upon completing execution of the query statement, which may complete block 1401, DBMS 1400 may proceed to block 1402. In block 1402, DBMS 1400 may perform a logging operation to collect logging data related to the just-processed query statement. The logging data for the query statement may include a list of the query statement's input variables associated with the determined and returned input variable values determined and returned by DBMS 1400 during runtime execution of the query statement. The logging data may also include table metrics logging data specifying a table identifier and a range of table rows returned in response to execution of the query statement with one or more input variables. DBMS 1400, while iterating through blocks 1401 and 3008, may examine the described table metrics data to determine table classification in block 3008. In block 1402, DBMS 1400 may store the collected logging data in logging area 3133 of DBMS 1400.

[0084] At block 1402, DBMS 1400 may transmit logging data to administrator system 110 for receipt by administrator system 110 for use in performance of machine learning processes. Transmitting the logging data at block 1402 may be performed, for example, upon completion of runtime execution of each query statement or, in one embodiment, at periodic time intervals. In response to receiving the logging data transmitted at block 1402, administrator system 110 may, at block 1101, perform training of one or more machine learning models using the logging data of input variable values transmitted at block 1402.

[0085] The administrator system 110 may train multiple predictive models in block 1101 using mapping logging data that maps input variables of a query statement to determined input variable values determined during runtime execution of the query statement. According to one embodiment, the system 100 may provide a predictive model for each query statement expression of a query statement that includes input variables whose input variable values are returned in execution of the query statement expression. The administrator system 110 may execute a machine learning process 111. In training block 1101, the administrator system 110 may apply the training data to predictive models 5002, as shown in FIG. 5.

[0086] The training data for training the predictive model 5002 may include (a) context parameters and (b) iterations of time series data of the determined input variable values. The iterations of the training data may be obtained from logging data sent by the database system 140 in block 1402 and received by the administrator system 110. The iterations of the training data may additionally or alternatively include logging data sent by one or more additional database systems configured in accordance with the database system 140 and received by the administrator system 110. The set of context parameter values (a) may be obtained from message data including transaction query data sent by the enterprise systems 120A-120Z in block 1201. According to embodiments herein, it is recognized that the message including the query statement may include context data that may be indicative of the workload of the enterprise systems 120A-120Z sending the transaction query data in block 1201 and the particular enterprise system.

[0087] Embodiments herein also recognize that query statements associated with one particular workload and enterprise system may be more likely to exhibit predictable patterns than query statements from multiple different enterprise systems 120A-120Z. Accordingly, embodiments herein may include training a predictive model 5002 using a set of context parameter values such that the predictive model 5002 may learn workload trends dependent on content data indicative of the workloads and enterprise systems associated with the determined time series data.

[0088] The set of context parameter values may include a set of parameter values extracted by DBMS 1400 from message data containing query statements received from enterprise systems 120A-120Z. Parameter values for use in the set of context parameter values may include one or more of, for example, accounting information, collection name, connection type, correlation information, LU name, Net ID, package name, execution, plane name, priority, procedure name, process name, scheduling environment, subsystem collection name, subsystem instance, subsystem parameter, Sysplex name, system name, transaction class / job class, transaction name / job name, or user ID, or a combination thereof.

[0089] Once trained, the predictive model 5002 can respond to query data. The query data for querying the predictive model 5002 may include a set of context parameter values that specify attributes of the current workload associated with the received incoming query statement that is the subject of processing in block 1401 (FIG. 2) and by process 300 as described with reference to FIG. 3. The trained predictive model 5002 may also be queried in block 1401 at various times during operation of the database system 140, for example, when a query statement is being processed and when the predictive model 5002 is being tested to determine whether it is generating predictions that meet a threshold level of accuracy.

[0090] Various machine learning modeling techniques may be used to provision a predictive model that predicts next input variable values depending on past input variable values. Machine learning modeling methods that may be applied may include, for example, Fourier transform analysis curve fitting, neural networks, support vector machines, linear regression, and the like. Machine learning methodologies may be combined; for example, according to one example, a deep Fourier neural network may be used to curve fit time series data. Embodiments herein recognize that time series of input variable values may exhibit periodic patterns that may be subject to modeling by various curve fitting methodologies, including Fourier transform machine learning methods. Fourier transform machine learning methods may be used to fit curves to time series data based on the principles of the Fourier transform.

[0091] To apply a Fourier transform-based machine learning method for curve fitting time series data provided by input variable values for query statements executed over time, the administrator system 110 may use discrete Fourier transform analysis to separate distinct strings. Referring to FIG. 6 , a discrete Fourier transform analysis performed on input time series training data 6002 provided by a series of runtime executions in which input variable values are determined over time may provide component frequency signals 6004, 6006, and 6008. A frequency domain representation 6010 of the input time series may exhibit peaks at the component frequencies. Once the component frequencies are determined, a random forest machine learning process may be used to determine weights for the various component frequencies.

[0092] Embodiments herein recognize that time series data defined by a series of input variable values over time may, in some cases, not be permanently periodic, but rather may exhibit periodicity only during select periods and aperiodic, e.g., random, behavior during other periods. Some time series of input variable values may exhibit periodic behavior followed by aperiodic behavior. That is, for an initial set of time slots, the input variable values of the time series may exhibit a periodic pattern, and in a subsequent set of time slots, the input variable values may exhibit an aperiodic pattern. Embodiments herein recognize that the precision with which input variable values associated with an input variable are represented in a time series may depend on the level of periodicity of the input variable time series.

[0093] 7 and 8, data plots are shown. In FIG. 7, a time series of input variable values over time exhibiting a periodic pattern is shown, and in FIG. 8, a plot showing the accuracy of predictions for the time series data of FIG. 7 using a predictive model is shown. Embodiments herein recognize that because the time series data of input variable values for particular input variables in a query statement may be selectively periodic rather than permanently periodic, the periodic input variable values may not be predictable within a threshold that meets a level of accuracy at all times, but rather may be predictable within a threshold that meets a level of accuracy at selected time slots over a deployment period.

[0094] According to one embodiment, the administrator system 110 may be configured to iteratively test each instance of a predictive model 5002 that is trained over time to iteratively determine whether the predictive model is generating predictions according to a threshold that meets a level of accuracy. In testing block 1102, the administrator system 110 may test one or more predictive models configured to predict input variable values associated with input variables of a query statement.

[0095] To perform testing in testing block 1102, administrator system 110 may compare (a) predicted input variable values output by one or more predictive models in response to a query with (b) ground truth data defined by holdout data of the logging data used to train and test the one or more predictive models. In testing block 1102, administrator system 110 may appropriately set an active / inactive status flag for each predictive model being trained that indicates whether the predictive model is currently generating predictions with a threshold that meets a level of accuracy.

[0096] Various methods may be used to determine whether a predictive model is outputting predictions within a threshold that meets a level of accuracy. For example, in testing block 1102, the administrator system 110 may apply one or more time series model quality measures to compare the predictions output by the trained predictive model to ground truth data defined by the holdout data. The measures applied to compare the predictions to the ground truth data may include, for example, mean squared error (MSE), mean absolute percentage error (MAPE), or root mean squared error (RMSE), or a combination thereof. According to one embodiment, a method is described herein comprising: receiving an incoming query statement, the incoming query statement including a query statement expression that includes input variables; predicting input variable values associated with the input variables; selecting an access path for runtime execution of the query statement dependent on the predicted input variable values; and performing the runtime execution of the query statement using the selected access path, wherein predicting the input variable values associated with the input variables comprises querying a predictive model for returning predicted input variable values, the predictive model being trained using training data including past input variable values determined for the input variables; and determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy; the method comprises performing a procedure of querying the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets the level of accuracy; and determining whether the predictive model is returning a prediction according to the threshold that meets the level of accuracy comprises comparing the forecast returned using the predictive model to ground truth data defined by holdout data of the training data including past input variable values.

[0097] Administrator system 110 may return an action decision in action decision block 1103 to set an active / inactive status flag for one or more trained predictive models and push one or more trained predictive models to database system 140 for use by DBMS 1400 to return predictions regarding input variable values in query processing performance. In action decision block 1103, administrator system 110 may set a predictive model's status flag to active when testing the predictive model indicates that the model is generating predictions using a threshold that meets the level of accuracy, and may set the status flag to inactive when testing the predictive model in block 1102 indicates that the predictive model is not generating predictions within the threshold that meets the level of accuracy.

[0098] In action decision block 1103, administrator system 110 may return an action decision to push the instance of predictive model 5002 to database system 140 on the condition that the predictive model is currently active, as can be determined by reading its status flag, and may return an action decision to avoid pushing the trained predictive model to database system 140 on the condition that the predictive model is inactive, as can be determined by reading the status flag in block 1103. Selectively pushing trained predictive models may improve computer system performance. Pushing trained predictive models to DBMS 1400 may improve data retrieval time for returning predicted input variable values. Pushing trained models may selectively reduce storage resource utilization.

[0099] Upon completion of action decision block 1103, the administrator system 110 may proceed to block 1104. In block 1104, the administrator system 110 may transmit model data defining one or more trained, active models to the database system 140 for storage in the model area 3132 of the data repository 138 of the DBMS 1400. Using the model data transmitted in block 1104, the administrator system 110 may transmit status data for each instance of the predictive model 5002 being trained by the administrator system 110 in block 1101, whether active (producing predictions using a threshold that meets the accuracy) or inactive (not producing predictions using a threshold that meets the accuracy).

[0100] Thus, upon receiving the status data transmitted in block 1104, DBMS 1400 has comprehensive information regarding the status of all predictive models being trained by administrator system 110, indicating whether the predictive model is active (producing predictions according to a threshold that meets the level of accuracy) or inactive (not producing predictions according to a threshold that meets the level of accuracy). Upon receiving the model and status data transmitted in block 1403, DBMS 1400 may update model area 3132 of data repository 138 in block 1403 so that the active / inactive status associated with all predictive models in model area 3132 is updated and so that model area 3132 includes, for each active predictive model in model area 3132, the most recently updated version of the active model trained in the most recent iteration of training block 1101 and pushed to DBMS 1400 in the most recent iteration of sending block 1104.

[0101] 3 , DBMS 1400 may check an active / inactive flag status indicator for each input variable of the query statement received in block 3002 to determine whether the predictive model is active or inactive in block 3006. If the predictive model is active, DBMS 1400 may query the active predictive model in block 3006 to return a prediction regarding the input variable values associated with the input variables of the query statement expression, and then proceed to block 3008 to use the returned predicted input variable values in returning an access path selected from multiple candidate access paths that are the subject of the cost analysis.

[0102] However, if DBMS 1400 examines the active / inactive flag status indicator in block 3006 and determines that a particular predictive model associated with a particular input variable in the query statement is inactive, then DBMS 1400 may perform a default operation for that particular input variable. According to the default operation, DBMS 1400 may apply default filter factor values using unknown input variable values to the default filter factor mapping decision data structure described with reference to Table B, without changing any assigned filter factor values using the process described with reference to different input variable values to filter factor mapping decision data structure of Table C.

[0103] According to the described operations, DBMS 1400 may only selectively query predictive models associated with input variables of a query statement, and thus selectively modify the selection of access paths dependent on the selectively predicted input variable values, provided that time series data specifying input variable values over time for particular input variables is determined to be sufficiently predictable and meet a threshold accuracy level.

[0104] According to the described scenario, it can be seen that a particular query statement can include a first input variable and a second input variable. In one example, a first predictive model and a second predictive model can be established to return predicted input variable values for the first input variable and the second input variable of the query statement. According to one scenario, testing the first predictive model at testing block 1102 can indicate that the predictive model for the first input variable successfully returns a prediction according to a threshold that meets the level of accuracy, while testing the second predictive model at testing block 1102 by administrator system 110 can indicate that the second predictive model does not generate a prediction for the input variable value according to the threshold that meets the level of accuracy. In the described scenario, the first predictive model can be labeled active by administrator system 110 at action decision block 1103, and the second predictive model can be labeled inactive by administrator system 110 at action decision block 1103. In block 1104, the administrator system 110 may, in the illustrated scenario, push, for each of the first and second predictive models, model data and status flag indicators defined by a trained predictive model trained with the most recent available training data for the first predictive model. The flag status indicator for the first predictive model may indicate that the first predictive model is active, and the flag status indicator for the second predictive model may indicate that the second predictive model is inactive.

[0105] Upon query processing the query statement at block 1401, DBMS 1400 may examine the active / inactive status indicator at block 3006 and determine that the first predictive model is active and the second predictive model is inactive. In the described scenario, DBMS 1400, when processing a query statement having a first input variable and a second input variable, may query the first predictive model to return a predicted input variable value for the first input variable, and for the second input variable, may avoid querying any predictive models to return a prediction regarding the input variable value (because the second predictive model is inactive). In the described scenario, default behavior continues for the second input variable, and DBMS 1400 does not adjust the value of the assigned filter factor depending on the query statement expression with the second input variable. For the second input variable, DBMS 1400 may determine the assigned filter factor using the unknown input variable value to the default filter factor mapping decision data structure described with reference to Table B. However, for query statement expressions that now include a first input variable that is sufficiently predictable, DBMS 1400 may adjust the assigned filter factor values in the manner described in connection with Tables C and D and the flowchart of Figure 3. For query statement expressions that now include a first input variable that is sufficiently predictable, DBMS 1400 may assign filter factor values using different input variable values to filter factor mapping data structures, as described in connection with Table C.receiving an incoming query statement, the incoming query statement including a query statement expression including input variables; predicting input variable values associated with the input variables; selecting an access path for runtime execution of the query statement dependent on the predicted input variable values; and performing the runtime execution of the query statement using the selected access path, wherein predicting the input variable values associated with the input variables comprises querying a predictive model for returning predicted input variable values, the predictive model being trained using training data including past input variable values determined for the input variables; the query statement including a second query statement expression having a second input variable; and a second predictive model, trained using training data including past input variable values determined for the second input variable, associated with the second input variable of the query statement; SUMMARY OF THE INVENTION A method is described herein comprising: determining whether a predictive model is returning a prediction according to a threshold that meets a level of accuracy; and determining whether a second predictive model is returning a prediction according to a prediction threshold that meets the level of accuracy; performing a procedure of querying the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets the level of accuracy; and in response to a determination that the second predictive model fails to return a prediction according to the prediction threshold that meets the level of accuracy, assigning a default filter factor for a second input variable without returning a prediction of the second input variable value for the second input variable; and selecting an access path for runtime execution of a query statement that is dependent on the predicted input variable value comprises selecting an access path for runtime execution of the query statement that is dependent on the predicted input variable value and that is dependent on the default filter factor.

[0106] Certain embodiments of the present disclosure may provide various technical computing advantages and practical applications for addressing challenges arising in the field of computer systems, including computing advantages. Embodiments of the present disclosure include a computer system defined by a database with improved performance. According to one aspect, input variable values of a query statement may be predicted using a predictive model trained by machine learning. The returned predictions may be used to adjust assigned filter factors, and the adjusted filter factors may be used for scoring an access path cost analysis and selecting an access path. The returned predictions may be used to classify table tendencies for tables associated with the input variables, and the classified table tendencies may be used for scoring an access path cost analysis and selecting an access path. According to one embodiment, the selection of an access path may be performed depending on predicted input variable values of the query statement returned by querying a trained predictive model that predicts input variable values in relation to input variables of the query statement. According to one embodiment, a trained predictive model that predicts input variable values associated with input variables may be returned by using the predictive model and repeatedly tested to determine the level of accuracy of the prediction. According to one embodiment, a status flag may be associated with each predictive model indicating the active / inactive status of the predictive model. A status flag associated with a predictive model may be active when the predictive model returns a prediction according to a threshold that meets the level of accuracy, and the flag status may be set to inactive when the predictive model returns a prediction that does not indicate the threshold that meets the level of accuracy. In processing the input variables of a query statement, the database management system may selectively query predictive models that return predictions for input variable values associated with the input variables depending on whether the predictive model is inactive or active. The database management system may perform access path selection dependent on the selectively predicted input variable value, provided that the input variable value is currently determined to be predictable within the threshold that meets the level of accuracy.

[0107] 9-11 illustrate various aspects of computing, including computer systems and cloud computing, in accordance with one or more aspects described herein.

[0108] Although this disclosure includes detailed descriptions of cloud computing, it should be understood in advance that implementation of the teachings described herein is not limited to cloud computing environments. Rather, embodiments of the present invention can be implemented in conjunction with any other type of computing environment now known or later developed.

[0109] Cloud computing is a service delivery model that enables convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal administrative effort or interaction with the service provider. The cloud model can include at least five characteristics, at least three service models, and at least four deployment models.

[0110] The characteristics are as follows:

[0111] On-Demand Self-Service: Cloud consumers can unilaterally provision computing capabilities, such as server time and network storage, automatically as needed, without requiring human interaction with the provider of the service.

[0112] Pervasive Network Access: Functionality is available over the network and accessed through standard mechanisms that facilitate use by thin or thick client platforms (eg, cell phones, laptops, and PDAs) in heterogeneous environments.

[0113] Resource Pool: A provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically allocated and reallocated according to demand. Consumers generally have no control or knowledge over the exact location of the resources provided, although location independence exists in that they may be able to specify a location (e.g., country, state, or data center) at a higher level of abstraction.

[0114] Rapid Elasticity: Features are quickly and elastically provisioned, in some cases automatically, and can be quickly scaled out, quickly released, and quickly scaled in. To the consumer, the features available for provisioning often appear unlimited, and any amount can be purchased at any time.

[0115] Measured Services: Cloud systems automatically control and optimize resource usage by leveraging metering capabilities at a level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource utilization can be monitored, controlled, and reported, providing transparency to both providers and consumers of utilized services.

[0116] The service model is as follows:

[0117] Software as a Service (SaaS): The functionality offered to the consumer is the use of a provider's applications running on a cloud infrastructure. The applications are accessible from a variety of client devices through a thin-client interface such as a web browser (e.g., web-based email). The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, storage, or further individual application functionality, with the possible exception of limited user-specific application configuration settings.

[0118] Platform as a Service (PaaS): The capability offered to consumers is the deployment of applications created or acquired by them onto a cloud infrastructure, written using programming languages and tools supported by the provider. The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, or storage, but does control the deployed applications and, in some cases, the application hosting environment configuration.

[0119] Infrastructure as a Service (IaaS): The capability offered to consumers is to provision processing, storage, network, and other basic computing resources, where the consumer can deploy and run any software, which may include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure, but does control the operating system, storage, deployed applications, and in some cases, limited control over the selection of networking components (e.g., host firewalls).

[0120] The deployment model is as follows:

[0121] Private Cloud: Cloud infrastructure operates exclusively for an organization. It can be managed by the organization or a third party and can exist on-premise or off-premise.

[0122] Community Cloud: Cloud infrastructure is shared by several organizations to support a specific community with shared interests (e.g., mission, security requirements, policy, and compliance considerations). It can be managed by the organization or a third party and can exist on-premises or off-premises.

[0123] Public Cloud: Cloud infrastructure is made available to the general public or large industry organizations and is owned by organizations that sell cloud services.

[0124] Hybrid Cloud: A cloud infrastructure is a composition of two or more clouds (private, community, or public) that remain unique entities but are tied together by standardized or proprietary technologies that allow for data and application portability (e.g., cloud bursting for load balancing between clouds).

[0125] Cloud computing environments are service-oriented with an emphasis on statelessness, loose coupling, modularity, and semantic interoperability. At the heart of cloud computing is an infrastructure that comprises a network of interconnected nodes.

[0126] Referring now to Figure 9, a schematic diagram of an example computing node is shown. Computing node 10 is merely one example of a computing node suitable for use as a cloud computing node and is not intended to suggest any limitation as to the scope of use or functionality of the embodiments of the present invention described herein. Regardless, computing node 10 may be implemented and / or capable of performing any of the functions described above. Computing node 10 may be implemented as a cloud computing node within a cloud computing environment, or may be implemented as a computing node in a computing environment other than a cloud computing environment.

[0127] Within computing node 10 is computer system 12, which is operable in numerous other general-purpose or special-purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that may be suitable for use with computer system 12 may include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices, and the like.

[0128] Computer system 12 may be described in the general context of computer system-executable instructions, such as program processes, being executed by a computer system. Generally, program processes may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. Computer system 12 may be practiced in a distributed cloud computing environment where tasks are performed by remote processing devices connected through a communications network. In a distributed cloud computing environment, program processes may be located in local computer system storage media and remote computer system storage media, including memory storage devices.

[0129] 9, computer system 12 within computing node 10 is shown in the form of a computing device. Components of computer system 12 may include, but are not limited to, one or more processors 16, system memory 28, and a bus 18 coupling various system components, including system memory 28, to processor 16. In one embodiment, computing node 10 is a computing node in a non-cloud computing environment. In one embodiment, computing node 10 is a computing node in a cloud computing environment, as described herein in connection with FIGS. 8-9.

[0130] Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include an Industry Standard Architecture (ISA) bus, a MicroChannel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0131] Computer system 12 typically includes a variety of computer system-readable media. Such media can be any available media that can be accessed by computer system 12 and can include both volatile and nonvolatile media, removable and non-removable media.

[0132] System memory 28 may include computer system-readable media in the form of volatile memory, such as random access memory (RAM) 30 or cache memory 32, or a combination thereof. Computer system 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be provided for reading from and writing to non-removable, non-volatile magnetic media (not shown, but commonly referred to as a "hard drive"). Although not shown, a magnetic disk drive may be provided for reading from and writing to removable, non-volatile magnetic disks (e.g., "floppy disks"), and an optical disk drive may be provided for reading from and writing to removable, non-volatile optical disks, such as CD-ROMs, DVD-ROMs, or other optical media. In such cases, each may be connected to bus 18 by one or more media interfaces. As further shown and described below, memory 28 may include at least one program product having a set of (e.g., at least one) program processes configured to perform the functions of embodiments of the present invention.

[0133] One or more programs 40, including a set of (at least one) program process 42, as well as an operating system, one or more application programs, other program processes, and program data, may be stored in memory 28, by way of example and not limitation. The one or more programs 40, including the program process 42, may generally perform the functions described herein. In one embodiment, database system 140 may include one or more computing nodes 10 and may include one or more programs 40 for performing the functions described in connection with method 300 of FIG. 3 and the database system 140, as described in the flowchart of FIG. 4. In one embodiment, administrator system 110 may include one or more computing nodes 10 and may include one or more programs 40 for performing the functions described in connection with administrator system 110, as described in the flowchart of FIG. 2. In one embodiment, one or more client UE devices 120A-120Z may include one or more computing nodes 10 and may include one or more programs 40 for performing the functions described in connection with one or more UE devices 120A-120Z, as described in the flowchart of FIG. 2. In one embodiment, the computing node-based systems and devices shown in FIG. 1 may include one or more programs for performing the functions described in connection with such computing node-based systems and devices.

[0134] Computer system 12 may also communicate with one or more external devices 14, such as one or more devices that allow a user to interact with computer system 12, such as a keyboard, pointing device, display 24, and / or any device that allows computer system 12 to communicate with one or more other computing devices (e.g., a network card, modem, etc.). Such communication may occur via an input / output (I / O) interface 22. Still further, computer system 12 may communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), or a public network (e.g., the Internet), or combinations thereof, via a network adapter 20. As shown, network adapter 20 communicates with other components of computer system 12 via a bus 18. Although not shown, it should be understood that other hardware or software components or combinations thereof may be used with computer system 12. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data archival storage systems, and the like. In addition to or instead of having external devices 14 and display 24 that may be configured to provide user interface functionality, computing node 10 in one embodiment may include a display 25 connected to bus 18. In one embodiment, display 25 may be configured as a touchscreen display and may be configured to provide user interface functionality, such as facilitating virtual keyboard functionality and entry of total data. Computer system 12 in one embodiment may also include one or more sensor devices 27 connected to bus 18. One or more sensor devices 27 may alternatively be connected through I / O interface 22.The one or more sensor devices 27 may, in one embodiment, include a global positioning sensor (GPS) device and may be configured to provide the location of the computing node 10. In one embodiment, the one or more sensor devices 27 may alternatively or additionally include, for example, one or more cameras, gyroscopes, temperature sensors, humidity sensors, pulse sensors, blood pressure (bp) sensors, or audio input devices. The computer system 12 may include one or more network adapters 20. In Figure 10, the computing node 10 is illustrated as being implemented in a cloud computing environment and is therefore referred to in the context of Figure 10 as a cloud computing node.

[0135] Referring now to FIG. 10 , an exemplary cloud computing environment 50 is shown. As shown, the cloud computing environment 50 comprises one or more cloud computing nodes 10 with which local computing devices used by cloud consumers, such as, for example, a personal digital assistant (PDA) or mobile phone 54A, a desktop computer 54B, a laptop computer 54C, and / or an automobile computer system 54N, may communicate. The nodes 10 may communicate with each other. They may be physically or virtually grouped (not shown) in one or more networks, such as a private cloud, a community cloud, a public cloud, or a hybrid cloud, or combinations thereof, as described above. This enables the cloud computing environment 50 to provide infrastructure, platform, or software, or combinations thereof, as a service without the cloud consumer having to maintain resources on their local computing devices. It should be understood that the types of computing devices 54A-N shown in FIG. 10 are merely exemplary, and that the computing nodes 10 and the cloud computing environment 50 may communicate with any type of computerized device via any type of network-addressable connection (e.g., using a web browser) or combination thereof.

[0136] 11, a set of functional abstraction layers provided by cloud computing environment 50 (FIG. 10) is shown. It should be understood in advance that the components, layers, and functions shown in FIG. 11 are intended to be merely exemplary, and that embodiments of the present invention are not limited thereto. As shown, the following layers and corresponding functions are provided:

[0137] Hardware and software layer 60 includes hardware and software components. Examples of hardware components include mainframe 61, reduced instruction set computer (RISC) architecture-based server 62, server 63, blade server 64, storage device 65, and network and networking components 66. In some embodiments, software components include network application server software 67 and database software 68.

[0138] The virtualization layer 70 provides an abstraction layer within which examples of virtual entities can be provided: virtual servers 71, virtual storage 72, virtual networks including virtual private networks 73, virtual applications and operating systems 74, and virtual clients 75.

[0139] In one example, management layer 80 may provide the functions described below. Resource provisioning 81 provides dynamic procurement of computing and other resources utilized to accomplish tasks within the cloud computing environment. Metering and pricing 82 provides cost tracking as resources are utilized within the cloud computing environment and billing or invoicing for the consumption of these resources. In one example, these resources may comprise application software licenses. Security provides identity verification for cloud consumers and tasks, as well as protection for data and other resources. User portal 83 provides access to the cloud computing environment for consumers and system administrators. Service level management 84 provides cloud computing resource allocation and management so that required service levels are met. Service level agreement (SLA) planning and fulfillment 85 provides advance arrangements and procurement of cloud computing resources where future requirements are forecasted according to SLAs.

[0140] The workload layer 90 provides examples of functionality for which a cloud computing environment may be utilized. Examples of workloads and functionality that may be provided from this layer include mapping and navigation 91, software development and lifecycle management 92, virtual classroom instruction delivery 93, data analytics processing 94, transaction processing 95, and a processing component 96 for predicted input variables and access path selection, as described herein. The processing component 96 may be implemented using one or more programs 40 illustrated in FIG. 9.

[0141] The present invention may be a system, a method, and / or a computer program product, at any possible level of technical detail integration. The computer program product may include a computer-readable storage medium (or media) having computer-readable program instructions for causing a processor to perform aspects of the present invention.

[0142] A computer-readable storage medium may be a tangible device that can hold and store instructions for use by an instruction-execution device. The computer-readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically encoded devices such as punch cards or ridge structures in grooves having instructions recorded thereon, and any suitable combination of the foregoing. Computer-readable storage medium, as used herein, is not to be construed as being a transitory signal per se, such as an electric wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse passing through a fiber optic cable), or an electrical signal transmitted over a wire.

[0143] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing / processing device, or may be downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network may comprise copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing / processing device.

[0144] The computer-readable program instructions for carrying out the operations of the present invention may be either assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for integrated circuits, or source or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk®, C++, or the like, or procedural programming languages such as the “C” programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be to an external computer (e.g., through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) may execute computer readable program instructions to personalize the electronic circuitry by utilizing state information of the computer readable program instructions to perform aspects of the present invention.

[0145] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0146] These computer-readable program instructions may be provided to a computer processor or other programmable data processing apparatus to produce a machine, such that the instructions, executing via the computer processor or other programmable data processing apparatus, create means for implementing the function(s) / act(s) specified in the block(s) of the flowcharts and / or block diagrams. These computer-readable program instructions, which may instruct a computer, programmable data processing apparatus, and / or other device to function in a particular manner, may also be stored on a computer-readable storage medium, such that a computer-readable storage medium having instructions stored therein comprises a product including instructions that implement aspects of the function(s) / act(s) specified in the block(s) of the flowcharts and / or block diagrams.

[0147] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause the computer, other programmable apparatus, or other device to perform a series of operational steps to generate a computer-implemented process, such that the instructions executing on the computer, other programmable apparatus, or other device implement the function / act specified in a block or blocks of the flowcharts and / or block diagrams.

[0148] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of instructions comprising one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks may occur in an order different from that noted in the figures. For example, two blocks shown in succession may actually be realized as a single step, may be executed concurrently or substantially concurrently in a partially or fully time-overlapping manner, or the blocks may even be executed in the reverse order depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowchart diagrams, and combinations of blocks in the block diagrams and / or flowchart diagrams, may be implemented by a special-purpose hardware-based system that performs the specified functions or operations or executes a combination of special-purpose hardware and computer instructions.

[0149] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It is further understood that the terms "comprise" (and any form of comprise, such as "comprises" and "comprising"), "have" (and any form of have, such as "has" and "having"), "include" (and any form of include, such as "includes" and "including"), and "contain" (and any form of contain, such as "contains" and "containing") are open-ended linking verbs. Consequently, a method or device that "comprises," "have," "include," or "contain" one or more steps or elements possesses those one or more steps or elements, but is not limited to possessing only those one or more steps or elements. Similarly, a method step or device element that "comprises," "has," "includes," or "contains" one or more features possesses those one or more features, but is not limited to possessing only those one or more features. As used herein, the term "based on" encompasses relationships where the elements are partially based and relationships where the elements are completely based. Methods, products, and systems described as having a certain number of elements may be implemented with fewer or more than the specified number of elements. Furthermore, a device or structure that is configured in a certain way is configured in at least that way, but may also be configured in ways not recited.

[0150] Numerical values and other values set forth herein, whether expressly set forth or inherently derived by the description of this disclosure, are considered to be modified by the term "about." As used herein, the term "about" defines the numerical boundaries of the modified value, including, but not limited to, ranges and values up to and including the modified numerical value. That is, numerical values can include the actual value explicitly set forth and other values that are or can be decimals, fractions, or other multiples of the actual value set forth and / or described in this disclosure.

[0151] Corresponding structures, materials, acts, and equivalents of all means or step-plus-function elements in the following claims are intended to include any structure, material, or act for performing a function, if any, in combination with other claimed elements, as specifically claimed. The description set forth herein has been presented for purposes of illustration and description, but is not intended to be exhaustive or limiting to the disclosed forms. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the present disclosure. The embodiments selected and described herein are intended to best explain the principles of one or more aspects and practical applications described herein, and to enable those skilled in the art to understand one or more aspects as described herein for various embodiments with various modifications, as anticipated and adapted for the particular use.

Claims

1. receiving an incoming query statement, the incoming query statement including a query statement expression including input variables; predicting input variable values associated with the input variables; selecting an access path for run-time execution of the incoming query statement dependent on the predicted input variable values; performing runtime execution of the incoming query statement using the selected access path; A computer-implemented method comprising:

2. 2. The computer-implemented method of claim 1, wherein predicting the input variable value associated with the input variable comprises querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variable.

3. 2. The computer-implemented method of claim 1, wherein predicting the input variable value associated with the input variable comprises querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variables, and wherein querying the predictive model for returning the predicted input variable value comprises querying the predictive model using query data including a set of context parameter values specifying attributes of a workload associated with the received incoming query statement, the set of context parameter values being extracted from a message received from an enterprise system including the incoming query statement.

4. 2. The computer-implemented method of claim 1, wherein predicting the input variable value associated with the input variable comprises querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variable, the computer-implemented method comprising determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy, and performing the querying of the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets a level of accuracy.

5. 2. The computer-implemented method of claim 1, wherein predicting the input variable value associated with the input variable comprises querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variable, the computer-implemented method comprising determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy, the computer-implemented method comprising performing the querying of the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets a level of accuracy, and wherein determining whether the predictive model is returning a prediction according to the threshold that meets a level of accuracy comprises comparing a forecast returned using the predictive model to ground truth data defined by holdout data of the training data including past input variable values.

6. 2. The computer-implemented method of claim 1, wherein predicting the input variable value associated with the input variable comprises querying a prediction model for returning the predicted input variable value, the prediction model being trained using training data including past input variable values determined for the input variable; the incoming query statement includes a second query statement expression having a second input variable; the computer-implemented method comprises querying a second prediction model for returning the second input variable value associated with a second input variable value; and selecting the access path for runtime execution of the incoming query statement dependent on the predicted input variable value comprises selecting the access path for runtime execution of the incoming query statement dependent on the predicted input variable value and dependent on the second input variable value.

7. The step of predicting the input variable value associated with the input variable includes querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variable, the incoming query statement including a second query statement expression having a second input variable, a second predictive model being trained using training data including past input variable values determined for the second input variable associated with the second input variable of the incoming query statement, the second predictive model being trained using training data including past input variable values determined for the second input variable, the computer-implemented method further comprising: determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy; and determining whether the second predictive model is returning a prediction according to a prediction threshold that meets a level of accuracy.

2. The computer-implemented method of claim 1, wherein the computer-implemented method comprises performing the querying of the predictive model in response to a determination that the predictive model returns a prediction according to the threshold that meets a level of accuracy; and the computer-implemented method comprises assigning a default filter factor for a second input variable without returning a prediction of a second input variable value for the second input variable in response to a determination that the second predictive model fails to return a prediction according to the prediction threshold that meets a level of accuracy; and wherein selecting the access path for runtime execution of the incoming query statement dependent on the predicted input variable values comprises selecting the access path for runtime execution of the incoming query statement dependent on the predicted input variable values and dependent on the default filter factor.

8. 8. The computer-implemented method of claim 1, wherein the step of selecting an access path comprises performing cost scoring of a plurality of candidate access paths and identifying a lowest-cost access path from the plurality of candidate access paths as the access path for runtime execution of the incoming query statement, the computer-implemented method comprising examining historical data to determine a table tendency classification for a table associated with the input variable values, and wherein the step of performing cost scoring of the plurality of candidate access paths comprises performing cost scoring of the plurality of candidate access paths depending on the table tendency classification.

9. The computer-implemented method of claim 1 , wherein predicting comprises querying a predictive model that has been trained by machine learning.

10. 2. The computer-implemented method of claim 1, wherein the predicting comprises querying a predictive model trained by machine learning, the computer-implemented method further comprising: determining input variable values associated with the predicted input variable values during the runtime execution of the incoming query statement; and using the determined input variable values to train the predictive model.

11. 2. The computer-implemented method of claim 1, wherein predicting comprises querying a predictive model trained by machine learning to curve-fit time series data defined by input variable values associated with previous instances of runtime execution of the incoming query statement.

12. 2. The computer-implemented method of claim 1, wherein the predicting comprises querying a predictive model trained by Fourier analysis-based machine learning to curve fit training data provided by time series data, the time series data being defined by input variable values associated with previous instances of runtime execution of the incoming query statement.

13. one or more processors, receiving an incoming query statement, the incoming query statement including a query statement expression including input variables; predicting input variable values associated with said input variables; selecting an access path for runtime execution of the incoming query statement dependent on the predicted input variable values; performing runtime execution of the incoming query statement using the selected access path; A computer program that executes

14. 14. The computer program product of claim 13, wherein predicting the input variable value associated with the input variable comprises querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variable.

15. 14. The computer program product of claim 13, wherein predicting the input variable value associated with the input variable comprises querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variables, and wherein querying the predictive model for returning the predicted input variable value comprises querying the predictive model using query data including a set of context parameter values specifying attributes of a workload associated with the received incoming query statement, the set of context parameter values being extracted from a message received from an enterprise system including the incoming query statement.

16. 14. The computer program product of claim 13, wherein the step of predicting the input variable value associated with the input variable comprises: querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variables; and the computer program causes the one or more processors to perform a step of determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy; and the computer program causes the one or more processors to perform the step of querying the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets a level of accuracy.

17. 14. The computer program of claim 13, wherein the step of predicting the input variable value associated with the input variable comprises: querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variables; the computer program causes the one or more processors to perform a step of determining whether the predictive model is returning a prediction according to a threshold that satisfies a level of accuracy; and the computer program causes the one or more processors to perform the step of querying the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that satisfies a level of accuracy; and the step of determining whether the predictive model is returning a prediction according to the threshold that satisfies a level of accuracy comprises comparing a forecast returned using the predictive model to ground truth data defined by holdout data of the training data including past input variable values.

18. The step of predicting the input variable value associated with the input variable comprises querying a predictive model for returning the predicted input variable value, the predictive model being trained using training data including past input variable values determined for the input variable, the incoming query statement comprising a second query statement expression having a second input variable, a second predictive model being associated with the second input variable of the incoming query statement, the second predictive model being trained using training data including past input variable values determined for the second input variable, the computer program causing the one or more processors to perform the steps of determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy, and determining whether the second predictive model is returning a prediction according to a prediction threshold that meets a level of accuracy, 14. The computer program of claim 13, wherein the computer program causes the one or more processors to perform the querying of the predictive model in response to a determination that the predictive model returns a prediction according to the threshold that meets a level of accuracy, and the computer program causes the one or more processors to perform the querying of the predictive model in response to a determination that the second predictive model fails to return a prediction according to the prediction ...

19. Memory and at least one processor in communication with the memory; receiving an incoming query statement, the incoming query statement including a query statement expression including input variables; predicting input variable values associated with the input variables; selecting an access path for run-time execution of the incoming query statement dependent on the predicted input variable values; performing runtime execution of the incoming query statement using the selected access path; program instructions executable by one or more processors via said memory to perform a method, A system comprising:

20. receiving an incoming query statement, the incoming query statement including a query statement expression including input variables; selecting an access path for runtime execution of the incoming query statement; performing a runtime execution of the incoming query statement using the selected access path, the performing the runtime execution of the incoming query statement comprising determining input variable values for the input variables; applying the determined input variable values as training data for training a predictive model, the predictive model being configured to return predictions about input variable values associated with the input variables; receiving a subsequent instance of the incoming query statement, the incoming query statement including the query statement expression including the input variable; querying the predictive model to predict input variable values for the input variables in the subsequent instance of the incoming query statement; selecting an access path for runtime execution of the subsequent instance of the incoming query statement dependent on the predicted input variable values; performing runtime execution of the subsequent instance of the incoming query statement using the selected access path; A computer-implemented method comprising:

21. 21. The computer-implemented method of claim 20, wherein the computer-implemented method comprises determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy, and wherein the computer-implemented method comprises performing the querying of the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets a level of accuracy.

22. 21. The computer-implemented method of claim 20, wherein the computer-implemented method comprises determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy, the computer-implemented method comprising performing the querying of the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets a level of accuracy, wherein the determining whether the predictive model is returning a prediction according to the threshold that meets a level of accuracy comprises comparing a forecast returned using the predictive model to ground truth data defined by holdout data of the training data that includes past input variable values used to train the predictive model.

23. Memory and at least one processor in communication with the memory; receiving an incoming query statement, the incoming query statement including a query statement expression including input variables; selecting an access path for runtime execution of the incoming query statement; performing a runtime execution of the incoming query statement using the selected access path, the performing the runtime execution of the incoming query statement comprising determining input variable values for the input variables; applying the determined input variable values as training data for training a predictive model, the predictive model being configured to return predictions about input variable values associated with the input variables; receiving a subsequent instance of the incoming query statement, the incoming query statement including the query statement expression including the input variable; querying the predictive model to predict input variable values for the input variables in the subsequent instance of the incoming query statement; selecting an access path for runtime execution of the subsequent instance of the incoming query statement dependent on the predicted input variable values; performing runtime execution of the subsequent instance of the incoming query statement using the selected access path; program instructions executable by one or more processors via said memory to perform a method, A system comprising:

24. 24. The system of claim 23, wherein the method comprises determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy, and wherein the method comprises performing the querying of the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets a level of accuracy.

25. 24. The system of claim 23, wherein the method comprises determining whether the predictive model is returning a prediction according to a threshold that meets a level of accuracy, the method comprising performing the querying of the predictive model in response to a determination that the predictive model is returning a prediction according to the threshold that meets a level of accuracy, and wherein the determining whether the predictive model is returning a prediction according to the threshold that meets a level of accuracy comprises comparing a forecast returned using the predictive model to ground truth data defined by holdout data of the training data that includes past input variable values used to train the predictive model.

Citation Information

Patent Citations

  • Optimizing device having neural network evaluating device

    JP1999175566A

  • Method and apparatus for predicting selectivity of database query join conditions using hypothetical query predicates having skewed value constants

    US20060106777A1

  • Plan Caching Using Density-Based Clustering

    US20130318069A1

  • Estimating cardinality selectivity utilizing artificial neural networks

    US20170323200A1