[MDEV-6015] Measure impact of optimizer_switch='exists_to_in=on' in 10.0 Created: 2014-04-02 Updated: 2014-04-11 Resolved: 2014-04-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Axel Schwenke |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
I am looking at Q4.
The query plan is similar. However, the second query should be able to use BKA. Run the query with and without BKA and measure the impact. |
| Comments |
| Comment by Sergei Petrunia [ 2014-04-02 ] | |||||||||||||||||||||
|
The Q4 variant I am using:
| |||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-04-02 ] | |||||||||||||||||||||
|
Query Q22, EXPLAINs with exists_to_in=on|off. The query uses WHERE .... AND NOT EXISTS(SELECT * FROM orders WHERE o_custkey = c_custkey). It seems, that the best way run the subquery is to use index lookup on "o_custkey = c_custkey". This is used for both exists_to_in=ON and exists_to_in=OFF. | |||||||||||||||||||||
| Comment by Axel Schwenke [ 2014-04-03 ] | |||||||||||||||||||||
|
Results from running DBT3/Q4/SF30 on MariaDB-10.0.10 with exits-to-in either on or off. Execution times: exists_to_in=off -> 284, 276, 280 (sec) EXPLAIN plans attached. | |||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-04-05 ] | |||||||||||||||||||||
|
Thanks. Looking at the EXPLAINs. The query plans have the same structure. Exists-to-in conversion has enabled BKA for table lineitem. However, it didn't bring a lot of speedup. | |||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-04-11 ] | |||||||||||||||||||||
|
Graphic trace of query's io when running with scale=1, cold buffer cache. | |||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-04-11 ] | |||||||||||||||||||||
|
IO trace for exists_to_in=off. Things to note |