•When running CHECK TABLE  on large InnoDB  tables, other threads may be blocked during CHECK TABLE  execution. To avoid timeouts, the semaphore wait threshold (600 seconds) is extended by 2 hours (7200 seconds) for CHECK TABLE  operations. If InnoDB  detects semaphore waits of 240 seconds or more, it starts printing InnoDB  monitor output to the error log. If a lock request extends beyond the semaphore wait threshold, InnoDB  aborts the process. To avoid the possibility of a semaphore wait timeout entirely, run CHECK TABLE QUICK  instead of CHECK TABLE . 

• CHECK TABLE  functionality for InnoDB SPATIAL  indexes includes an R-tree validity check and a check to ensure that the R-tree row count matches the clustered index. 

• CHECK TABLE  supports secondary indexes on virtual generated columns, which are supported by InnoDB . 

•As of MySQL 8.0.14, InnoDB  supports parallel clustered index reads, which can improve CHECK TABLE  performance. InnoDB  reads the clustered index twice during a CHECK TABLE  operation. The second read can be performed in parallel. The innodb_parallel_read_threads  session variable must be set to a value greater than 1 for parallel clustered index reads to occur. The default value is 4. The actual number of threads used to perform a parallel clustered index read is determined by the innodb_parallel_read_threads  setting or the number of index subtrees to scan, whichever is smaller. 

## CHECK TABLE Usage Notes for MyISAM Tables 

The following notes apply to MyISAM  tables: 

• CHECK TABLE  updates key statistics for MyISAM  tables. 

•If CHECK TABLE  output does not return OK  or Table is already up to date , you should normally run a repair of the table. See Section 7.6, “MyISAM Table Maintenance and Crash Recovery” . 

•If none of the CHECK TABLE  options QUICK , MEDIUM , or EXTENDED  are specified, the default check type for dynamic-format MyISAM  tables is MEDIUM . This has the same result as running myisamchk --medium-check tbl_name  on the table. The default check type also is MEDIUM  for static-format MyISAM  tables, unless CHANGED  or FAST  is specified. In that case, the default is QUICK . The row scan is skipped for CHANGED  and FAST  because the rows are very seldom corrupted. 

## 13.7.3.3 CHECKSUM TABLE Statement 

CHECKSUM TABLE tbl_name  [, tbl_name ] ... [QUICK | EXTENDED] 

CHECKSUM TABLE  reports a checksum for the contents of a table. You can use this statement to verify that the contents are the same before and after a backup, rollback, or other operation that is intended to put the data back to a known state. 

This statement requires the SELECT  privilege for the table. 

This statement is not supported for views. If you run CHECKSUM TABLE  against a view, the Checksum value is always NULL , and a warning is returned. 

For a nonexistent table, CHECKSUM TABLE  returns NULL  and generates a warning. 

During the checksum operation, the table is locked with a read lock for InnoDB  and MyISAM . 

## Performance Considerations 

By default, the entire table is read row by row and the checksum is calculated. For large tables, this could take a long time, thus you would only perform this operation occasionally. This row-by-row calculation is 

