[MDEV-7953] check_table_name() takes 0.19% in OLTP RO Created: 2015-04-09  Updated: 2016-02-16

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.1
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Sergey Vojtovich Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None

Epic Link: Performance: micro optimizations

 Description   

Data comes from Sandy Bridge system running sysbench OLTP RO in 1 thread against 1 table.

Call graphs:

-   0.19%  mysqld  mysqld
   - check_table_name(char const*, unsigned long, bool)
      + 83.81% st_select_lex::add_table_to_list(THD*, Table_ident*, st_mysql_lex_string*, unsigned long, thr_lock_type, enum_mdl_type, List<Index_hint>*, List<String>*, st_mysql_lex_string*)
      + 16.19% MYSQLparse(THD*)

There're a couple of problems with check_table_name():

  • use_mb(system_charset_info) condition should be moved out of the loop
  • check_for_path_chars condition should be moved out of the loop

Generated at Thu Feb 08 07:23:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.