Patent Document ID: 9031934
Application ID: 13686030

Base Claim:
1. A method for estimating a filter factor for access path optimization in a database, comprising: extracting from a statement segment for database query a relation condition which defines a relationship between a variable and a first table; obtaining a first statistics information according to the relation condition and statistics information of the first table, wherein the first statistics information comprises first data value information relating to possible values of the variable under the relation condition, and a first probability information relating to an occurrence probability of data values in the first data value information; extracting from the statement segment a filter condition which defines a relationship between the variable and a second table; obtaining a second statistics information according to the filter condition and statistics information of the second table, wherein the second statistics information comprises second data value information relating to the possible values of the variable under the filter condition, and a second probability information relating to an occurrence probability of the data values in the second data value information; and according to the first statistics information and the second statistics information, estimating the filter factor of the filter condition for access path optimization in the database query relating to the filter condition, said estimating including: determining possible values of a filtering result, the determining including: taking a predetermined part of the data values in an intersection of the first data value information and the second data value information as the possible values of the filtering result, wherein the predetermined part is selected in one of the following ways: selecting a predetermined number of data values with the largest occurrence probabilities in the intersection, and selecting the data values whose occurrence probabilities in the intersection exceed a predetermined threshold.

---

Claim 3:
3. The method according to claim 1 , wherein said obtaining the first statistics information comprises: obtaining the values corresponding to the variable as the first data value information from the statistics information of the first table according to the relationship between the variable and the first table, and obtaining occurrence frequencies of the values corresponding to the variable as the first probability information.