mirror of
https://github.com/MariaDB/server.git
synced 2026-04-27 02:35:29 +02:00
MDEV-7964 - delete_dynamic() takes 0.12% in OLTP RO
delete_dynamic() was called 9-11x per OLTP RO query + 3x per BEGIN/COMMIT. 3 calls were performed by LEX_MASTER_INFO. Added condition to call those only for CHANGE MASTER. 1 call was performed by lock_table_names()/Hash_set/my_hash_free(). Hash_set was supposed to be used for DDL and LOCK TABLES to gather database names, while it was initialized/freed for DML too. In fact Hash_set didn't do any useful job here. Hash_set was removed and MDL requests are now added directly to the list. The rest 5-7 calls are done by optimizer, mostly by Explain_query and friends. Since dynamic arrays are used in most cases, they can hardly be optimized. my_hash_free() overhead dropped 0.02 -> out of radar. delete_dynamic() overhead dropped 0.12 -> 0.04.
This commit is contained in:
parent
7cfa803d8e
commit
c4d2c4e844
3 changed files with 20 additions and 32 deletions
|
|
@ -260,12 +260,15 @@ struct LEX_MASTER_INFO
|
|||
my_init_dynamic_array(&repl_ignore_domain_ids,
|
||||
sizeof(ulong), 0, 16, MYF(0));
|
||||
}
|
||||
void reset()
|
||||
void reset(bool is_change_master)
|
||||
{
|
||||
delete_dynamic(&repl_ignore_server_ids);
|
||||
/* Free all the array elements. */
|
||||
delete_dynamic(&repl_do_domain_ids);
|
||||
delete_dynamic(&repl_ignore_domain_ids);
|
||||
if (unlikely(is_change_master))
|
||||
{
|
||||
delete_dynamic(&repl_ignore_server_ids);
|
||||
/* Free all the array elements. */
|
||||
delete_dynamic(&repl_do_domain_ids);
|
||||
delete_dynamic(&repl_ignore_domain_ids);
|
||||
}
|
||||
|
||||
host= user= password= log_file_name= ssl_key= ssl_cert= ssl_ca=
|
||||
ssl_capath= ssl_cipher= relay_log_name= 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue