Bug #69801 | performance regression between 5.5 and 5.6 for str_to_date function | ||
---|---|---|---|
Submitted: | 20 Jul 2013 8:38 | ||
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S5 (Performance) |
Version: | 5.6.12 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | STR_TO_DATE |
[20 Jul 2013 8:38]
Shane Bester
[20 Jul 2013 8:39]
MySQL Verification Team
profile of str_to_date
Attachment: bug69801_5.6.14_str_to_date_profile.png (image/png, text), 30.75 KiB.
[20 Jul 2013 18:31]
Davi Arnaut
5.5 also uses sprintf in my_date_to_str. Perhaps you mean 5.1 and earlier?
[15 Nov 2019 11:10]
MySQL Verification Team
Some updates.... mysql> select benchmark(100000000,str_to_date('2013 November 1','%Y %M %d')),version(); +----------------------------------------------------------------+-----------+ | benchmark(100000000,str_to_date('2013 November 1','%Y %M %d')) | version() | +----------------------------------------------------------------+-----------+ | 0 | 8.0.17 | +----------------------------------------------------------------+-----------+ 1 row in set (29.21 sec) mysql> select benchmark(100000000,str_to_date('2013 November 1','%Y %M %d')),version(); +----------------------------------------------------------------+-----------+ | benchmark(100000000,str_to_date('2013 November 1','%Y %M %d')) | version() | +----------------------------------------------------------------+-----------+ | 0 | 8.0.18 | +----------------------------------------------------------------+-----------+ 1 row in set (16.25 sec) mysql> select benchmark(100000000,str_to_date('2013 November 1','%Y %M %d')),version(); +----------------------------------------------------------------+-----------+ | benchmark(100000000,str_to_date('2013 November 1','%Y %M %d')) | version() | +----------------------------------------------------------------+-----------+ | 0 | 5.7.28 | +----------------------------------------------------------------+-----------+ 1 row in set (30.62 sec) So I noticed an improvement in 8.0.18.