Details
-
New Feature
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
Conditions looking like
SUBSTR(str_col, 1, n) = const_str
|
where the prefix of str_col is compared against a constant value can be rewritten as range conditions as
const_str_low <= str_col <= const_str_high
|
which will improve the optimizer capabilities of building better execution plan (for example, using indexes on column str_col and applying range optimizations).
The similar transformation is already implemented for conditions like
str_col LIKE 'foo%' |
aiming for the same goal.
Similar rewrite is implemented for DATE() and YEAR() function at MDEV-8320, and that approach may be used as a reference.
Attachments
Issue Links
- includes
-
MDEV-4414 INDEX - SUBSTRING, LEFT and others string functions that could be optimized with index
-
- Closed
-
- relates to
-
MDEV-35564 cannot convert backslash to swe7
-
- Closed
-
Activity
Transition | Time In Source Status | Execution Times |
---|
|
48d 15h 14m | 1 |
|
42s | 1 |
|
8d 12h 22m | 2 |
|
13d 9h 52m | 2 |
|
5d 19h 47m | 1 |
|
23d 15h 33m | 1 |
|
13d 8h 23m | 1 |