Created
January 1, 2020 18:04
-
-
Save rueian/b0c04b1eae208c5693874bced1e24efd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * If we have most-common-values info, add up the fractions of the MCV | |
| * entries that satisfy MCV OP PATTERN. These fractions contribute | |
| * directly to the result selectivity. Also add up the total fraction | |
| * represented by MCV entries. | |
| */ | |
| mcv_selec = mcv_selectivity(&vardata, &opproc, constval, true, | |
| &sumcommon); | |
| /* | |
| * Now merge the results from the MCV and histogram calculations, | |
| * realizing that the histogram covers only the non-null values that | |
| * are not listed in MCV. | |
| */ | |
| selec *= 1.0 - nullfrac - sumcommon; | |
| selec += mcv_selec; | |
| result = selec; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment