Bug #108719 Startup was very slow on instances with a large number of tables
Submitted: 9 Oct 2022 15:31 Modified: 11 Oct 2022 13:06
Reporter: Charles Rodrigues Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:8.0.30 OS:Windows (Server 2012 R2)
Assigned to: CPU Architecture:x86 (64 bits)
Tags: 8.0.30, MySQL, SlowStart

[9 Oct 2022 15:31] Charles Rodrigues
Description:
Servidor Windows Server 2012 R2, 128 GB
MySQL 8.0.30
Storage 12.000 Iops
Cluster with 490 schemas with 1.31TB in size
All schemas have month partitioned tables
Tables (87.830) + Partitions (221.612) = 309.442

MySQL very very slow to start, takes more than 33 minutes to start

How to repeat:
Create a database with more than 300k tables, with at least three tables with monthly partitioning starting in 2021.
[10 Oct 2022 13:06] MySQL Verification Team
Hello Mr. Rodrigues,

Thank you very much for your bug report.

However, this is not a bug.

This is what happens when you do not tune your OS and MySQL configuration variables in order to cache properly all those tables and partitions.

Hence, please check our Reference Manual and that part of your OS Manual on increasing the caching of the files.

Not a bug.
[11 Oct 2022 12:58] MySQL Verification Team
Hi,

This is not a bug, since a point of reference is 5.6 , which is not maintained any more.

5.7 and 8.0 have introduced a very large number of features, which require more work in opening the tables.

Next, your configuration can be improved and also, you have not tuned your OS for the purpose.

Not a bug.
[11 Oct 2022 13:06] Charles Rodrigues
Hi,

There is nothing in the MySQL manual that reports any changes to the Windows operating system.

Even on the forums or no settings still emerged effects.

I believe the bug reported here remains: https://bugs.mysql.com/bug.php?id=96340

In my view this is a bug or problem in the start of MySQL.

From what I observed, the delay is in checking the .ibd files, in some cases it takes more than 40ms per file.