MySQL 8.0 Reference Manual 8.10.1 InnoDB Buffer Pool Optimization ......................................................................... 1815 8.10.2 The MyISAM Key Cache .................................................................................... 1816 8.10.3 Caching of Prepared Statements and Stored Programs ........................................ 1820 8.11 Optimizing Locking Operations ...................................................................................... 1822 8.11.1 Internal Locking Methods .................................................................................... 1822 8.11.2 Table Locking Issues .......................................................................................... 1824 8.11.3 Concurrent Inserts .............................................................................................. 1826 8.11.4 Metadata Locking ............................................................................................... 1826 8.11.5 External Locking ................................................................................................. 1830 8.12 Optimizing the MySQL Server ....................................................................................... 1831 8.12.1 Optimizing Disk I/O ............................................................................................ 1831 8.12.2 Using Symbolic Links ......................................................................................... 1832 8.12.3 Optimizing Memory Use ..................................................................................... 1835 8.13 Measuring Performance (Benchmarking) ........................................................................ 1841 8.13.1 Measuring the Speed of Expressions and Functions ............................................ 1842 8.13.2 Using Your Own Benchmarks ............................................................................. 1842 8.13.3 Measuring Performance with performance_schema .............................................. 1843 8.14 Examining Server Thread (Process) Information ............................................................. 1843 8.14.1 Accessing the Process List ................................................................................. 1843 8.14.2 Thread Command Values ................................................................................... 1845 8.14.3 General Thread States ....................................................................................... 1847 8.14.4 Replication Source Thread States ....................................................................... 1854 8.14.5 Replication I/O Thread States ............................................................................. 1854 8.14.6 Replication SQL Thread States ........................................................................... 1855 8.14.7 Replication Connection Thread States ................................................................. 1856 8.14.8 NDB Cluster Thread States ................................................................................ 1857 8.14.9 Event Scheduler Thread States ........................................................................... 1857 9 Language Structure ................................................................................................................... 1859 9.1 Literal Values .................................................................................................................. 1859 9.1.1 String Literals ....................................................................................................... 1859 9.1.2 Numeric Literals ................................................................................................... 1862 9.1.3 Date and Time Literals ......................................................................................... 1862 9.1.4 Hexadecimal Literals ............................................................................................ 1865 9.1.5 Bit-Value Literals .................................................................................................. 1867 9.1.6 Boolean Literals ................................................................................................... 1868 9.1.7 NULL Values ....................................................................................................... 1869 9.2 Schema Object Names ................................................................................................... 1869 9.2.1 Identifier Length Limits ......................................................................................... 1870 9.2.2 Identifier Qualifiers ............................................................................................... 1871 9.2.3 Identifier Case Sensitivity ..................................................................................... 1873 9.2.4 Mapping of Identifiers to File Names ..................................................................... 1875 9.2.5 Function Name Parsing and Resolution ................................................................. 1876 9.3 Keywords and Reserved Words ....................................................................................... 1880 9.4 User-Defined Variables ................................................................................................... 1912 9.5 Expressions .................................................................................................................... 1915 9.6 Query Attributes .............................................................................................................. 1919 9.7 Comments ...................................................................................................................... 1922 10 Character Sets, Collations, Unicode .......................................................................................... 1925 10.1 Character Sets and Collations in General ....................................................................... 1926 10.2 Character Sets and Collations in MySQL ....................................................................... 1927 10.2.1 Character Set Repertoire .................................................................................... 1929 10.2.2 UTF-8 for Metadata ............................................................................................ 1931 10.3 Specifying Character Sets and Collations ....................................................................... 1932 10.3.1 Collation Naming Conventions ............................................................................ 1933 x