content_image/745516.jpg
The following statements are not  equivalent: 

SELECT ... FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES SHOW GRANTS ... 

## 26.3.34 The INFORMATION_SCHEMA STATISTICS Table 

The STATISTICS  table provides information about table indexes. 

Columns in STATISTICS  that represent table statistics hold cached values. The information_schema_stats_expiry  system variable defines the period of time before cached table statistics expire. The default is 86400 seconds (24 hours). If there are no cached statistics or statistics have expired, statistics are retrieved from storage engines when querying table statistics columns. To update cached values at any time for a given table, use ANALYZE TABLE . To always retrieve the latest statistics directly from storage engines, set information_schema_stats_expiry=0 . For more information, see Section 8.2.3, “Optimizing INFORMATION_SCHEMA Queries” . 

<img src='content_image/745516.jpg'>

The STATISTICS  table has these columns: 

• TABLE_CATALOG 

## Note 

If the innodb_read_only  system variable is enabled, ANALYZE TABLE may fail because it cannot update statistics tables in the data dictionary, which use InnoDB . For ANALYZE TABLE  operations that update the key distribution, failure may occur even if the operation updates the table itself (for example, if it is a MyISAM  table). To obtain the updated distribution statistics, set information_schema_stats_expiry=0 . 

The name of the catalog to which the table containing the index belongs. This value is always def . 

• TABLE_SCHEMA 

The name of the schema (database) to which the table containing the index belongs. 

• TABLE_NAME 

The name of the table containing the index. 

• NON_UNIQUE 

0 if the index cannot contain duplicates, 1 if it can. 

• INDEX_SCHEMA 

The name of the schema (database) to which the index belongs. 

• INDEX_NAME 

The name of the index. If the index is the primary key, the name is always PRIMARY . 

• SEQ_IN_INDEX 

The column sequence number in the index, starting with 1. 

• COLUMN_NAME 

