Global filter factor estimation
A computer maps a literal in a database query to a digital representation, wherein the database query comprises a predicate, the literal is a part of the predicate, and the digital representation is predetermined based at least in part on external statistical data. The computer estimates a filter factor for the predicate based at least in part on the digital representation and compressed statistical data, wherein the compressed statistical data are prepared at least in part from the external statistical data.
1. A computer-implemented method for estimation of a filter factor comprising:
mapping a literal in a database query to a digital representation, wherein the database query comprises a predicate, the literal is a part of the predicate, and the digital representation is predetermined based at least in part on external statistical data; and
estimating a filter factor for the predicate based at least in part on the digital representation and compressed statistical data, wherein the compressed statistical data are prepared at least in part from the external statistical data.
2. The method according to claim 1 , wherein the predicate of the database query is related to a column of a table, and the external statistical data contain statistical information relevant to content of the column.
3. The method according to claim 2 , wherein the statistical information relevant to the content of the column comprises information about occurrences of possible literals in a context relevant to the content of the column, and the possible literals comprise the literal in the database query.
4. The method according to claim 3 , wherein the possible literals are assigned with respective digital representations having lengths which are related to the occurrences of the possible literals in the context.
5. The method according to claim 2 , wherein the compressed statistical data comprise statistical information on a scale of lengths of digital representations determined according to content of the column.
6. The method according to claim 2 , further comprising:
updating the compressed statistic data based at least in part on change in at least one of: content of the column, and the external statistical data.
7. The method according to claim 1 , further comprising:
determining an access path for the database query based at least in part on the filter factor.