My Oracle Support Banner

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

Last updated on SEPTEMBER 04, 2023

Applies to:

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

Symptoms

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.

Changes

 

Cause

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
Symptoms
Changes
Cause
Solution
 Upgrade to MySQL 8.0 or Later
 Limit the Database and Tables Scanned
 Limit the Columns Included
 Ensure the Table Caches are Large Enough
References


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