-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance of LOAD MYSQL SERVERS TO RUNTIME #829
Comments
renecannao
added a commit
that referenced
this issue
Dec 9, 2016
This commit is able to speed up LOAD MYSQL SERVERS TO RUNTIME up to 10x for very large mysql_servers table with tens of thousands of servers. Main improvements: * removed 1 unnecessary call to `generate_mysql_servers_table()` * replaced 1 call to `generate_mysql_servers_table()` with UPDATE statements when necessary * implemented new function `servers_add()` that replaces `server_add()` to perform bulk operation * replaced calls to `sqlite3_exec()` with proper parameters bindings * use of multirows INSERT statements (32 rows at the time) Miror improvements: * added new variable mysql-hostgroup_manager_verbose , 1 by default for backward compatibility and debugging * in not debug mode, access to HGM db has no shared cache * in not debug mode, tables in HGM have checks disabled Further note: * Once issue #797 is completed, `mysql_servers` in MyHGM can be simplified further
The performance of
|
Performance of
|
renecannao
added a commit
that referenced
this issue
Dec 9, 2016
This is achieved using multirows INSERTs and sqlite prepare
With
|
renecannao
added a commit
that referenced
this issue
Dec 9, 2016
A further optimization in `MySQL_HostGroups_Manager::generate_mysql_servers_table()` makes `LOAD MYSQL SERVERS TO RUNTIME` around 35 times faster than original implementation. `SAVE MYSQL SERVERS TO MEMORY` is now over 10 times faster than the original implementation.
Performance keeps improve drastically:
|
👍 good job, thank you |
Implemented in 1.4.0. Closing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For really large
mysql_servers
table,LOAD MYSQL SERVERS TO RUNTIME
is time consuming.This affects only extremely large setups.
Here is an example with 16k entries in
mysql_servers
:The text was updated successfully, but these errors were encountered: