Automatically determining optimization frequencies of queries with parameter markers
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Benefits of technology
Problems solved by technology
Method used
Image
Examples
first embodiment
[0051]FIG. 2 is a flow diagram of a process of automatically determining optimization frequencies of queries with parameter markers in the system of FIG. 1, in accordance with embodiments of the present invention. The optimization frequency determination process of FIG. 2 begins at step 200. In step 202, a software tool (e.g., extract & transform tool 106 in FIG. 1) collects bind values of each parameter marker of a set of one or more parameter markers included in a query. In a first embodiment, the bind values are written into binary dump file 104 (see FIG. 1) (e.g., a RDSMon dump file provided by a DB2® feedback warehouse architecture) and the bind values are subsequently extracted from the binary dump file in step 202 by extract & transform tool 106 (see FIG. 1).
second embodiment
[0052]In a second embodiment, a software tool (not shown) that replaces extract & transform tool 106 in FIG. 1 uses single column statistics (e.g., information about frequent values and quantiles of a table's column) from system catalog tables to collect the bind values in step 202. Using single column database statistics in step 202 advantageously allows bind values to be collected according to their selectivities, thereby permitting the bind values to be used to analyze the whole query execution plan space, as described below relative to FIG. 4A. Hereinafter, a query execution plan space is also referred to simply as a plan space. Further, using database statistics in step 202 makes it possible to collect bind values for queries that never executed. On the other hand, using single column statistics in step 202 requires up-to-date statistics and refreshing such statistics is expensive. Further, collecting bind values from single column statistics assumes independence of the columns...
third embodiment
[0053]In a third embodiment, a software tool (not shown) that replaces extract & transform tool 106 in FIG. 1 randomly selects bind value sets in step 202. The bind value sets are selected from the tables and columns to which the parameter marker predicates of a query refer. Random selection of bind value sets in step 202 advantageously allows bind values for any query to be selected irrespective of whether the query ever executed. The number of collected bind values may be assigned as the values are randomly selected from the whole range of data. Further, using random sampling to collect bind values in step 202 allows whole bind value sets to be collected and not single bind values. Therefore, independence of the columns to which the parameter markers refer does not have to be assumed. However, it is very expensive to collect bind values by random sampling if the query joins large tables because the whole data range has to be scanned to ensure a satisfactory distribution of bind va...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


