[MDEV-20774] 10.4.8 refuses to use an index, even with FORCE INDEX Created: 2019-10-08 Updated: 2021-03-19 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.4.8 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Gordan Bobic | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7 |
||
| Description |
|
MariaDB 10.0.34:
10.4.8:
I changed the following to match 10.0.34: This results in the query taking seconds rather than milliseconds. A hugely crippling bug. |
| Comments |
| Comment by Gordan Bobic [ 2019-10-08 ] | |||
|
It looks like something changed significantly in 10.4.x. In 10.0.x it was possible to use a regular b-tree index for the above query. In 10.4.x, the index has to be changed to a spatial r-tree index for the optimizer to consider it even with FORCE INDEX. | |||
| Comment by Varun Gupta (Inactive) [ 2019-10-08 ] | |||
|
Hi Gordon, Can you help to clarify did changing optimizer flags to match 10.0 help or not.
| |||
| Comment by Gordan Bobic [ 2019-10-14 ] | |||
|
The table structure is here: CREATE TABLE `om_listings_search` ( On 10.0.x the latlng key was a regular B-Tree key and it worked. |