1. 1.MySQLhistorical

    This page collects MySQL notes on installation, data types, architecture, replication, troubleshooting, and load testing.

  2. 1.1 MySQL explainhistorical

    EXPLAIN shows how MySQL executes SQL, including table access order and access methods, helping analyze queries and identify optimization opportunities.

  3. 1.2 MySQL Primary-Replica Replicationhistorical

    MySQL leader-follower replication synchronizes data from the primary to replicas. These notes examine usage and execution through read-heavy scenarios.

  4. 1.3 MySQL SQL Tuninghistorical

    These notes record SQL-tuning scenarios, starting with data volume and concurrency and examining changes such as limiting query ranges.

  5. 1.4 MySQL Installation and Configurationhistorical

    These notes record MySQL installation and configuration, including replication identifiers, error logs, and checks after startup.

  6. 1.5 MySQL Query Optimizerhistorical

    A SQL statement may have several execution plans. The MySQL optimizer uses query trees and cost estimates to choose a suitable plan.

  7. 1.6 MySQL Storage Engineshistorical

    MySQL storage engines manage data storage and interact with the underlying file system when executing SQL operations.

  8. 1.7 MySQL Lockshistorical

    MySQL lock structures record their transaction and wait state. These notes use those fields to examine how locks relate to transactions and data.

  9. 1.8 MySQL Indexeshistorical

    MySQL Indexes: An index is a structure that sorts the values of one or more columns in a database table and is a data structure (B+Tree) that helps MySQL obtain data efficiently.

  10. 1.9 MySQL Index Implementationhistorical

    MySQL Index Implementation: In the InnoDB storage engine, each index corresponds to a B+ tree.

  11. 1.10 MySQL File Systemhistorical

    Each database has a subdirectory in the MySQL data directory. These notes examine how database creation relates to the files stored there.

  12. 1.11 MySQL Pageshistorical

    Records are stored within pages in a defined format. These notes examine MySQL page organization through row formats and variable-length-field information.

  13. 1.12 MySQL Data Typeshistorical

    This note presents MySQL data types in a reference diagram for reviewing field-type choices.

  14. 1.13 MySQL bin-loghistorical

    The binlog is an archival log at the MySQL Server layer. It records operations that change the database, rather than ordinary queries.

  15. 1.14 MySQL Architecturehistorical

    MySQL requests pass through connection management and query-processing components. These notes organize the architecture along the path of a client request.

  16. 1.15 MySQL Connectorhistorical

    The MySQL connector manages client connections. Once established, an idle connection can be closed according to the server's timeout settings.

  17. 1.16 MySQL Statisticshistorical

    MySQL uses statistics to estimate query costs. These notes cover how statistics are stored and used when choosing execution plans.

  18. 1.17 MySQL Table Access Methodshistorical

    MySQL uses access methods, or access types, to describe how queries retrieve table records. These notes examine the different methods and their characteristics.

  19. 1.18 MySQL Slow Query Loghistorical

    The MySQL slow query log records SQL statements whose execution time exceeds a threshold, helping identify queries for further analysis.

  20. 1.19 MySQL show profilehistorical

    Use MySQL profiling to inspect query execution records, then use show profile to examine CPU and block-I/O costs for a selected query.

  21. 1.20 System Databaseshistorical

    MySQL system databases store information such as permissions, stored routines, events, logs, help, and time zones. These notes describe the role of each database.

  22. 1.21 MySQL Parserhistorical

    The MySQL parser breaks SQL statements into tokens and analyzes their syntax before optimization and execution.

  23. 1.22 MySQL Executorhistorical

    The MySQL executor checks permissions and executes SQL through storage-engine interfaces that read or modify data.

  24. 1.23 MySQL Production Issue Troubleshootinghistorical

    MySQL production troubleshooting can begin with active sessions and resource-heavy SQL, followed by analysis with tools such as EXPLAIN. These notes record the commands.

  25. 1.25 Cloud MySQLhistorical

    These notes record the nodes and configuration of an example Tencent Cloud MySQL environment, including deployment relationships and usage.

  26. 1.26 MySQL InnoDB Buffer Poolhistorical

    The InnoDB buffer pool is memory allocated when MySQL starts to cache table and index data and reduce disk I/O.

  27. 1.27 MySQL Tuninghistorical

    MySQL tuning can begin by finding slow SQL through logs or monitoring, then using EXPLAIN to analyze execution plans and locate bottlenecks.

  28. 1.28 canalhistorical

    Canal parses the MySQL binlog to capture incremental changes and synchronize them to systems such as Elasticsearch and Redis.

  29. 1.29 InnoDB Buffer Poolhistorical

    The InnoDB buffer pool is memory allocated when MySQL starts to cache table and index data and reduce disk I/O.

  30. 1.30 InnoDB MVCChistorical

    MVCC, or multiversion concurrency control, maintains data versions so reads and writes can run concurrently, using visibility rules to select the version a transaction reads.

  31. 1.31 InnoDB redo loghistorical

    The redo log supports InnoDB crash recovery by restoring changes that were not fully written before a failure.

  32. 1.32 InnoDB undo loghistorical

    The undo log records logical data changes with inverse operations for inserts, updates, and deletes. These notes explain its relationship to transactions.

  33. 1.33 InnoDB Transactionshistorical

    InnoDB transactions begin with begin or start transaction and finish with commit or rollback. These notes cover transaction operations and their implementation.

  34. 1.34 InnoDB Tablespaceshistorical

    Tablespaces are a logical way to organize InnoDB data. These notes explain storage through the relationships among tablespaces, segments, extents, and pages.

  35. 1.35 InnoDB and MyISAM Index Comparisonhistorical

    InnoDB organizes data and indexes in pages. These notes use pages and B+ trees to compare InnoDB and MyISAM storage layouts.

  36. 1.36 MySQL InnoDBhistorical

    InnoDB uses read and write buffering to reduce repeated disk access. These notes examine the engine's internal structure through those components.

  37. 1.37 MySQL Flushhistorical

    A page is dirty when its contents in memory differ from those on disk. Flushing writes dirty pages to disk to bring them back into agreement.