[MDEV-17802] Check how optimizer behaves for TPC-DS queries Created: 2018-11-22 Updated: 2023-12-20 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | benchmarking | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
We had looked at some of TPC-DS queries on a case-by-case basis before. It will be interesting to do a more comprehensive test. Possible goals
ReferencesReferences:
|
| Comments |
| Comment by Sergei Petrunia [ 2018-11-22 ] | ||||||||||||||||||||||||||||||||||||||
|
Fo example, there is a fairly nice post here: https://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-tpc-ds | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-22 ] | ||||||||||||||||||||||||||||||||||||||
|
The data generator will produce csv files with empty spaces for NULLs. There is a compiler #define to make it produce data suitable for MySQL/MariaDB:
Generating ~1G of data:
Loading the data
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-22 ] | ||||||||||||||||||||||||||||||||||||||
|
Generating queries:
Output of the first run: - query_0.sql | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-22 ] | ||||||||||||||||||||||||||||||||||||||
|
The queries are not in MySQL's dialect of SQL. Made some obvious fixes, but there are issues that can't be fixed easily: Query 80: We dont support this (parse error):
changing it to
produces: Query 86: same as above:
Query 27: the same:
Query 36:
Query 22: group by rollup(...) order by ... | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-22 ] | ||||||||||||||||||||||||||||||||||||||
|
adopt-queries-for-mariadb-part1.diff | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-22 ] | ||||||||||||||||||||||||||||||||||||||
|
Filed the cause of us being unable to run some queries as MDEV-17807. (Yes, one can use a derived table to work around this limitation.) | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-23 ] | ||||||||||||||||||||||||||||||||||||||
|
adopt-queries-for-mariadb-v2.diff Names of the failing queries:
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-23 ] | ||||||||||||||||||||||||||||||||||||||
|
nov23-out34-run-log.txt
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-24 ] | ||||||||||||||||||||||||||||||||||||||
|
Attempted to run on MySQL 8.0. A few queries produce errors not observed with MariaDB:
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-24 ] | ||||||||||||||||||||||||||||||||||||||
|
MariaDB 10.3 vs MySQL 8.0 comparison - mariadb-vs-mysql-nov24.ods Need to run it again and check everything before making any conclusions. | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-11-29 ] | ||||||||||||||||||||||||||||||||||||||
|
Re-ran the benchmark on 10.4 over re-generated data. Execution time is very different.
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2018-12-03 ] | ||||||||||||||||||||||||||||||||||||||
|
The idea to use pt-query-digest to collect query time histograms was not a good one, as they have fixed bounds:
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2019-03-04 ] | ||||||||||||||||||||||||||||||||||||||
|
A collection of scripts to run the benchmark: https://github.com/spetrunia/tpcds-run-tool First results: random seed generator for dataset matters a lot. Need to run more tests to analyze the impact (are there "heavy" RNGSEED parameter values that cause all databases to be slow? Or some databases are slow and some are fast?) I think, the latter is the case but I need to have the data from multiple controlled runs to be able to tell this with certainty. | ||||||||||||||||||||||||||||||||||||||
| Comment by Julien Fritsch [ 2023-12-05 ] | ||||||||||||||||||||||||||||||||||||||
|
Automated message: |