I need some help understanding a few things.
We use Google Cloud SQL MySQL8.0 and had an incident today where the working theory is that the instance was under memory pressure and took longer than expected to process its queries.
When opening the instance view, we currently get a status notification from Google itself suggesting to increase our
table_open_cache (which at the moment is the default=4000).
Now I want to increase the value, but am not really sure where to set it at. Google suggests to increase it whenever the amount of open tables is higher than
table_open_cache. For us both values seem to always be
So my first question:
SHOW OPEN TABLES and
SHOW GLOBAL STATUS LIKE 'Open_tables' give me different values. First is around ~360, the latter is 4000. How can I explain the difference between these two values?
If open tables can be higher than
tables_open_cache why does it look as if for our instance they are always the same?
EDIT: Third question: Is there a way for me to find out who is causing the opening of tables?