1

I enabled log-queries-not-using-indexes in /etc/my.cnf

I can see now my queries without indexes but the issue is my log is full of queries like this:

SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE COLLATION_NAME = 'utf8_general_ci';

SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE COLLATION_NAME = 'utf8mb4_bin';

I know it's a bad idea to make changes on this database 'information_schema', so how to avoid to have theses queries in my logs?

zeflex
  • 1,487
  • 1
  • 14
  • 29

1 Answers1

0
  • In my opinion, log_queries_not_using_indexes is virtually useless. It has some use briefly during development, but it is noise in production.
  • information_schema, at least before 8.0, had no indexes and were not 'real' tables.
  • Why are you reaching to information_schema so often? See if you can cut back on the number of such calls.
Rick James
  • 135,179
  • 13
  • 127
  • 222
  • `information_schema` is called by the system, not by my scripts. Maybe due to cPanel OS, not sure. – zeflex Jul 15 '19 at 12:27