Merge lp:~sergei.glushchenko/percona-server/5.5-BT34411-ps-blueprint-optimize-userstat into lp:percona-server/5.5
Proposed by
Sergei Glushchenko
Status: | Merged |
---|---|
Approved by: | Laurynas Biveinis |
Approved revision: | no longer in the source branch. |
Merged at revision: | 606 |
Proposed branch: | lp:~sergei.glushchenko/percona-server/5.5-BT34411-ps-blueprint-optimize-userstat |
Merge into: | lp:percona-server/5.5 |
Diff against target: |
402 lines (+86/-220) 3 files modified
Percona-Server/sql/handler.cc (+2/-0) Percona-Server/sql/sql_connect.cc (+80/-172) Percona-Server/sql/structs.h (+4/-48) |
To merge this branch: | bzr merge lp:~sergei.glushchenko/percona-server/5.5-BT34411-ps-blueprint-optimize-userstat |
Related bugs: | |
Related blueprints: |
Optimize userstat code 5.5
(High)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | Approve | ||
Vlad Lesin (community) | g2 | Approve | |
Review via email: mp+190963@code.launchpad.net |
Description of the change
Avoid evaluating the length of user name, table name and index name every time when
hash lookup happens by storing lengths in *_STATS structs.
Remove redundant add_user_stats() and add_thread_stats().
Remove redundant condition in update_
http://
To post a comment you must log in.
Looks good, but every time when update_ global_ user_stats( ) is invoked the following construction is used:
if (unlikely( opt_userstat) ) >update_ stats(true) ; global_ user_stats( thd, true, time(NULL));
{
thd-
#ifndef EMBEDDED_LIBRARY
update_
#endif
}
Why don't make some macros or inline function to avoid code duplication?