[MDEV-17255] New optimizer defaults and ANALYZE TABLE Created: 2018-09-20 Updated: 2018-12-11 Resolved: 2018-12-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | 10.4.1 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Varun Gupta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
We have
One of the effects of the new settings is that statement like
after This was enabled in MTR and was instrumental in finding a lot of bugs related to EITS (Good). However, it is not appropriate for production uses: If ANALYZE TABLE t1 collects EITS stats, it takes much more time (my measurement: 10x time the full table scan). This is BAD. Possible ways out: Solution 1: Make ANALYZE TABLE t1 not collect EITS stats
Solution 2: Make ANALYZE TABLE t1 collect EITS stats for MTR but not users.
(One may argue that this is bad as MTR will run in an environment that's not like the users have. On the other hand, MTR will run with predictable statistical data. MTR used to run with sampled, non-predictable stats which made `rows` column and query plans unstable) Solution 3:Wait until Vicentiu and Teodor are done with EITS-via-sampling. |
| Comments |
| Comment by Sergei Petrunia [ 2018-09-20 ] |
|
(Me and Varun are leaning towards Solution #2) |
| Comment by Sergei Golubchik [ 2018-09-20 ] |
|
I prefer Solution #3. I generally don't like adding new variables, we have too many of them already. And particularly not new variables to make mtr happy. Sampling is not that difficult. Perhaps the sampling task keeps growing and it is difficult now, but going back to the basics, just the functionality to make EITS ANALYZE faster than old-fashioned ANALYZE can be implemented rather quickly. |
| Comment by Sergei Petrunia [ 2018-10-25 ] |
|
Noting the outcome of discussions on an earlier optimizer call (didn't take notes back then): Solution #3 would created dependency, so we are going to with solution #2. (If a good sampling implementation is pushed into 10.4 release, we would have an option to change this) |
| Comment by Varun Gupta (Inactive) [ 2018-11-16 ] |
|
Patch |
| Comment by Sergei Petrunia [ 2018-11-24 ] |
|
Review input provided over email |
| Comment by Varun Gupta (Inactive) [ 2018-11-27 ] |
|
After discussions with psergey, we came to the conclusion we also need COMPLEMENTARY_FOR_QUERIES |
| Comment by Varun Gupta (Inactive) [ 2018-12-05 ] |
|
Patch |
| Comment by Sergei Petrunia [ 2018-12-06 ] |
|
Review input provided over email. More test coverage is needed. |
| Comment by Varun Gupta (Inactive) [ 2018-12-06 ] |
|
Fixed the previous patch to show the correct test coverage |
| Comment by Sergei Petrunia [ 2018-12-08 ] |
|
Ok to push. |