[MDEV-4414] INDEX - SUBSTRING, LEFT and others string functions that could be optimized with index Created: 2013-04-22 Updated: 2015-11-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | roberto spadim | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Hi guys, i have a table like this: with 500k rows check the query SELECT cc_hash_key the problem is the optimization... could it use the index linha_digitavel? like the "LIKE" operator? explain=> "Using index condition; Using where", rows =2 could SUBSTRING(char field,1,?) and LEFT(char_field,?) -------- the point is, optimize rewrinting this:
to
and this:
to
or rewrite the LEFT(column,1234) to a virtual column, if it's exists, in this case we can use index |
| Comments |
| Comment by roberto spadim [ 2013-04-22 ] |
|
i tryed no sucess, >500k rows in explain |
| Comment by roberto spadim [ 2013-04-23 ] |
|
feature request |
| Comment by roberto spadim [ 2013-06-18 ] |
|
maybe |