Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.8.6
-
None
Description
Having a different character set when compiling a function can impact the performance of the function significantly.
The function itself has the proper character sets for input parameters and the result.
Have a look at the attached function. In the following sequence you would observe that the execution is almost 10 times slower for just 10000 invocation and the only difference is the character set set when compiling the function.
root@lukav::/vagrant# mysql test --init-command='set names utf8mb4' < ./set_names_test.sql |
root@lukav::/vagrant# time mysql test --init-command='set names utf8mb4' -e "SELECT set_names_test(CONCAT('a', seq)) from seq_1_to_10000" > /dev/null |
|
real 0m0,190s
|
user 0m0,007s
|
sys 0m0,004s
|
|
|
root@lukav::/vagrant# mysql test --init-command='set names utf8' < ./set_names_test.sql |
root@lukav::/vagrant# time mysql test --init-command='set names utf8mb4' -e "SELECT set_names_test(CONCAT('a', seq)) from seq_1_to_10000" > /dev/null |
|
real 0m8,008s
|
user 0m0,000s
|
sys 0m0,010s
|
If this is expected behaviour it should be well documented, but I couldn't find anything on the subject.
Attachments
Issue Links
- relates to
-
MDEV-29988 Major performance regression with 10.6.11
- Closed