diff options
author | Igor Babaev <igor@askmonty.org> | 2019-08-30 15:49:07 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-08-30 15:49:07 -0700 |
commit | d1490c177139faa71cd88af71fdb7d88a8f45000 (patch) | |
tree | 86086ac8d6816708919e258d10350fb5d4e4bf04 /sql/table.h | |
parent | 7060b0320d1479bb9476e0cbd4acc584e059e1ff (diff) | |
download | mariadb-git-10.3-mdev15777.tar.gz |
MDEV-15777 Use inferred IS NOT NULL predicates in the range optimizer10.3-mdev15777
This patch introduces the optimization that allows range optimizer to
consider index range scans that are built employing NOT NULL predicates
inferred from WHERE conditions and ON expressions.
The patch adds a new optimizer switch not_null_range_scan.
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h index fa6cb707efb..47096aacb67 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1344,6 +1344,13 @@ public: SplM_opt_info *spl_opt_info; key_map keys_usable_for_splitting; + /* + Conjunction of the predicates of the form IS NOT NULL(f) where f refers to + a column of this TABLE such that they can be inferred from the condition + of the WHERE clause or from some ON expression of the processed select + and can be useful for range optimizer. + */ + Item *notnull_cond; inline void reset() { bzero((void*)this, sizeof(*this)); } void init(THD *thd, TABLE_LIST *tl); |