My Oracle Support Banner

Querying information_schema.TABLES Is Slow in MySQL 5.7 and Earlier (Doc ID 2038763.1)

Last updated on MARCH 24, 2020

Applies to:

MySQL Server - Version 5.0 to 5.7 [Release 5.0 to 5.7]
Information in this document applies to any platform.


Querying the TABLES table in the Information Schema is slow. This particularly happens when the query has no WHERE clause limiting the database and/or table names and the database has many tables.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
 Upgrade to MySQL 8.0 or Later
 Limit the Database and Tables Scanned
 Limit the Columns Included
 Ensure the Table Caches are Large Enough

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.