[MDEV-8326] Covering indexes never used when selecting a Virtual Column Created: 2015-06-17 Updated: 2023-10-04 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.4, 10.5, 10.6, 10.11, 11.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Federico Razzoli | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | virtual_columns | ||
| Description |
|
The optimizer seems not to be aware of how virtual columns can use indexes. I don't know if this optimization is doable for WHERE or ORDER BY. But here is a case where I think that a covering index should be used:
Could the optimizer be informed that the two queries do exactly the same thing? |
| Comments |
| Comment by Brad Jorgensen [ 2015-12-29 ] | ||||||||||||||||||||||
|
It should use the covering index, but it might not be using it due to the low amount of data. Does it use the covering index if you have the same table without the virtual column? | ||||||||||||||||||||||
| Comment by Alice Sherepa [ 2017-04-27 ] | ||||||||||||||||||||||
|
index is not used, 5.5-10.2
|