Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if mysql5.6 does not exist when importing Times innodb_table_stats

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces what to do if mysql5.6 does not exist in the Times innodb_table_stats. What is introduced in the article is very detailed and has certain reference value. Interested friends must finish reading it!

Encountered this error while dealing with the problem.

InnoDB: Error: Fetch of persistent statistics requested for table "mytest". "pomstd" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats insttestd.

InnoDB: Error: Table "mysql". "innodb_table_stats" not found.

InnoDB: Recalculation of persistent statistics requested for table "mytest". "pomstd" but the required persistent statistics storage is not present or is corrupted. Using transient stats insttestd.

Check the directory and did not find this file

This is a new performance analysis file added by mysql5.6, and the usual solution is to create this file:

CREATE TABLE `innodb_table_ stats` (

`database_ name` varchar (64) COLLATE utf8_bin NOT NULL

`table_ name` varchar (64) COLLATE utf8_bin NOT NULL

`last_ update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

`n _ rows` bigint (20) unsigned NOT NULL

`clustered_index_ size` bigint (20) unsigned NOT NULL

`sum_of_other_index_ sizes` bigint (20) unsigned NOT NULL

PRIMARY KEY (`database_ name`, `table_ name`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0

CREATE TABLE `innodb_index_ stats` (

`database_ name` varchar (64) COLLATE utf8_bin NOT NULL

`table_ name` varchar (64) COLLATE utf8_bin NOT NULL

`index_ name` varchar (64) COLLATE utf8_bin NOT NULL

`last_ update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

`stat_ name` varchar (64) COLLATE utf8_bin NOT NULL

`stat_ value` bigint (20) unsigned NOT NULL

`sample_ size` bigint (20) unsigned DEFAULT NULL

`stat_ substitution` varchar (1024) COLLATE utf8_bin NOT NULL

PRIMARY KEY (`database_ name`, `table_ name`, `index_ name`, `stat_ name`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0

The above is all the contents of the article "what to do if mysql5.6 does not exist in Times innodb_table_stats". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report