diff options
author | unknown <sanja@askmonty.org> | 2013-04-18 22:22:04 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2013-04-18 22:22:04 +0300 |
commit | 9441e536535af3e71aaa81801645ab42bd07e89f (patch) | |
tree | 4479a5d77e53380b7bd2d9b3d4db3c271ea6b40a /sql/opt_range.h | |
parent | 8c71e7a38358c79e1b5b9072fa7407cec3cfd273 (diff) | |
download | mariadb-git-9441e536535af3e71aaa81801645ab42bd07e89f.tar.gz |
MDEV-4345
Sampling of selectivity of LIKE predicate.
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r-- | sql/opt_range.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h index d98bf1186e8..963551cabdb 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -1051,4 +1051,11 @@ void store_key_image_to_rec(Field *field, uchar *ptr, uint len); extern String null_string; +/* check this number of rows (default value) */ +#define SELECTIVITY_SAMPLING_LIMIT 5000 +/* but no more then this part of table (10%) */ +#define SELECTIVITY_SAMPLING_SHARE 0.10 +/* do not check if we are going check less then this number of records */ +#define SELECTIVITY_SAMPLING_THRESHOLD 10 + #endif |