| Bug #60345 | trim trailing spaces processes data only byte wise (the continue of bug14637) | ||
|---|---|---|---|
| Submitted: | 4 Mar 2011 17:11 | Modified: | 15 Jan 2013 15:18 |
| Reporter: | Linhai Song | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server | Severity: | S5 (Performance) |
| Version: | 5.1.55 6.0.11 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Contribution, performance | ||
[4 Mar 2011 17:11]
Linhai Song
[12 Mar 2011 2:04]
Linhai Song
I have done some unit test, and found that if the number of blank characters is larger than 4, patch version will work better.
I put my unit test results as follows:
blank characters patch un-patch
1 0.016 0.013
2 0.019 0.017
3 0.022 0.019
4 0.02 0.21
5 0.021 0.024
6 0.023 0.026
7 0.028 0.029
8 0.023 0.03
9 0.024 0.035
10 0.028 0.037
11 0.029 0.04
12 0.024 0.044
13 0.026 0.045
14 0.028 0.048
15 0.031 0.051
code fragments are run 1000000 in my unit test, and time unit is second.
[4 Jan 2013 8:29]
MySQL Verification Team
I also found another optimization, filed it internally as Bug 14057034 - WASTED CPU CYCLES IN MY_UTF8_UNI WHERE RESULTING MY_WC_T RESULT IS NOT USED
[15 Jan 2013 15:18]
Matthew Lord
I think that Shane identified the underlying issue and opened an internal feature request regarding it. Due to this, I will mark this as verified.
