[MDEV-28434] benchmark optimizer for MariaDB 10.9 Created: 2022-04-28  Updated: 2022-11-01  Resolved: 2022-11-01

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Fix Version/s: N/A

Type: Task Priority: Critical
Reporter: Axel Schwenke Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Attachments: File MDEV-28434.ods     File MDEV-28434.rar    

 Description   

New optimizer features are available in branch 10.7-selectivity. We need to have a benchmark with optimizer-sensitive workload (DBT-3 aka TPC-H). This should compare 10.7-selectivity with vanilla 10.7.



 Comments   
Comment by Axel Schwenke [ 2022-04-28 ]

monty please confirm that the test should use commit 23afec6966a in branch bb-10.7-selectivity. I ask because that commit (although the last one) is marked as being from Mon Nov 1 12:34:24 2021 +0200. This could however be an artefact from git workflow.

Please also add any details that are missing in this ticket. I take from our conversation in slack, that there are no special settings required in my.cnf. So I will run 10.7 and 10.7-selectivity with the same my.cnf. I'll do ANALYZE TABLE <tablename> after loading and before running the queries. Does this need some special options?

Once you are ready, please assign this Jira ticket back to me. I'd like to run the benchmarks over the weekend, so this is kind of urgent.

Comment by Michael Widenius [ 2022-05-03 ]

You should use the last commit in 10.7-selectivity (don't use bb-10.7-selectivity, that is an old one)
Otherwise the ticket is ok

Comment by Axel Schwenke [ 2022-05-09 ]

I have added data for 6 different DBT3 runs:

  • SF10 and SF30 not using histograms
  • SF10, SF30, SF50 and SF100 using histograms

The histograms were enforced using ANALYZE TABLE ... PERSISTENT FOR ALL with setting analyze_sample_percentage = 0 (automatically chosing a sample percentage). Even when histograms were used, some warmup effect was visible. That means: even when using the same execution plan, subsequent runs were faster then the first one.

The database versions under test were

  • vanilla MariaDB 10.7.3
  • git branch 10.7-selectivity, commit a523568eab5

both built locally using the same compiler and build script.

Result:

MariaDB 10.7.3 is almost always faster. There are a few queries that 10.7-selectivity executes 10% or more faster (marked green in attached spreed sheet). But also some queries, notably Q6, Q8, Q12 and Q20 that 10.7-selectivity executes 10% or more (much more) slower. Those are marked red.

The RAR file contains the complete results, especially the EXPLAIN EXTENDED plans.

Attachments:

MDEV-28434.ods spread sheet with high level overview of data. MDEV-28434.rar archive with complete results. Subdir res01 is for 10.7.3, res02 for 10.7-selectivity.

Comment by Axel Schwenke [ 2022-11-01 ]

followup ticket MDEV-29929

Generated at Thu Feb 08 10:00:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.