[MDEV-10321] MariaDB doesn't use the expected indexes with TokuDB Created: 2016-07-01 Updated: 2017-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - TokuDB |
| Affects Version/s: | 5.5.38, 10.0, 10.1 |
| Fix Version/s: | 10.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Osiris Support | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | TokuDB | ||
| Environment: |
Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64) |
||
| Attachments: |
|
| Description |
|
Hello, Please find attached a dataset. We first execute, using the MyISAM table (toku_problem_myisam)
But when we execute the same query, using the TokuDB table (toku_problem_tokudb), it uses the PRIMARY index instead of the expected "query" index.
We faced this problem with different versions of MariaDB and TokuDB. Please let us know if you need more information. Thank you |
| Comments |
| Comment by Elena Stepanova [ 2016-07-02 ] | ||||||||||||||||||||||||||||||||
|
Could you please attach your cnf file(s)? I'm getting very different plans, including the query with the MyISAM table. | ||||||||||||||||||||||||||||||||
| Comment by Osiris Support [ 2016-07-04 ] | ||||||||||||||||||||||||||||||||
|
Hello, I am sorry but I forgot one step, we run an analyze on every table after importing the dataset, which actually gives a different explain in both cases. Just after importing the dataset, without running analyze we get :
And after running these ANALYZE :
We get:
Anyways in both cases we do not expect PRIMARY to be the chosen index for the table toku_problem_toku. Please find attached the my.cnf file we used my.cnf | ||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-07-09 ] | ||||||||||||||||||||||||||||||||
|
It cannot be the config file that you use for MariaDB 5.5/10.0. It contains options that no longer exist, so the server wouldn't even start with it. Also, importantly for this issue, it does not contain any TokuDB configuration at all. Could you please find the right cnf file(s)? | ||||||||||||||||||||||||||||||||
| Comment by Osiris Support [ 2016-07-15 ] | ||||||||||||||||||||||||||||||||
|
Hello, | ||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-07-16 ] | ||||||||||||||||||||||||||||||||
|
Thanks. I'm getting somewhat different plans, but the part about query vs PRIMARY is reproducible (as of current post-10.0.26 tree), and I can also confirm that with the forced use of query index SELECT works faster on my machine. 10.2 is also affected. psergey, | ||||||||||||||||||||||||||||||||
| Comment by Osiris Support [ 2017-04-27 ] | ||||||||||||||||||||||||||||||||
|
Hello, |