[MDEV-4150] Benchmark *execution* speed of simple DBT-3 query: MariaDB vs MySQL-it-merged-from Created: 2013-02-08 Updated: 2014-04-12 Resolved: 2014-04-12 |
|
| 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: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
quote from the email: Date: Wed, 06 Feb 2013 20:03:00 -0800 If we have a lower performance for MariaDB 10.0.1 for the same queries Please focus first on simple queries like Q1 and see why the numbers are Message-ID: <512AE0AD.9060406@askmonty.org> Axel, |
| Comments |
| Comment by Axel Schwenke [ 2013-02-19 ] |
|
The fb1 machine broke down Friday evening. This task is on hold until either the machine is operable again or I find other hardware for this. |
| Comment by Sergei Petrunia [ 2013-03-11 ] |
|
Stack trace: #0 str_to_datetime (str=0xd48a228 "1998-12-01", length=10, l_time=0x4fa5ab3c, flags=25165825, was_cut=0x4fa5a974) at sql-common/my_time.c:175 This seems to be hit for every row we get. |
| Comment by Sergei Petrunia [ 2013-03-11 ] |
|
In 5.3, str_to_datetime is called only a few times at query start. Per-record evaluation proceed along this stack trace: #0 Item_cache_int::val_int (this=0x7ffc700256e8) at item.cc:8301 |
| Comment by Sergei Petrunia [ 2013-03-11 ] |
|
The difference comes from "constant expression caching" that appeared in mariadb-5.3 already had some caching mechanisms. Check out get_datetime_value(), if (cache_arg && item->const_item() && item->type() != Item::CACHE_ITEM) Item_cache_temporal cache= new Item_cache_temporal(f_type); (*) At line (**) the datetime value is cached. This kind of caching is not visible Enter MariaDB-5.5. It has a general-purpose caching mechanism invoked at the get_datetime_value() in line The outcome is: EXPLAIN EXTENDED shows value cache to be used, but actually |
| Comment by Sergei Petrunia [ 2013-03-11 ] |
|
Looking at the Item_cache* Item_cache::get_cache(const Item *item, const Item_result type) function: in 5.5, the switch(type) has this variant: case TIME_RESULT: The problem is that Item_date_add_interval->result_type() returns STRING_RESULT. In mysql-5.6, there is no "case TIME_RESULT" part at all, instead there is: switch (type) { case STRING_RESULT: |
| Comment by Sergei Petrunia [ 2013-03-11 ] |
|
The slowdown caused by conversion is filed as |
| Comment by Sergei Petrunia [ 2013-03-14 ] |
|
Hi Axel,
(it would be best to benchmark on the same hardware/settings that you did Q1-on-myisam benchmarks on, so that we could compare all results). |
| Comment by Sergei Petrunia [ 2014-04-12 ] |
|
Closing as |