MySQL learning


1. Throughput definition: the number of queries per unit time is exactly the reciprocal of our performance definition
2. The minimum time granularity that MySQL can store is seconds (MariaDB supports second level time types)
3. DataTime: independent of time zone, it uses 8 fields of storage space in the format of
Integer of yyyymmddhhmmss
4. Timestamp: uses 4 bytes to store the number of seconds since midnight on January 1, 1970
5. The advantages and disadvantages of paradigm are as follows

  • The update operation of normalization is usually faster than that of anti normalization
  • There is little or no duplicate data, so less data needs to be modified
  • Tables are usually smaller, can be better placed in memory, and execute faster
  • We rarely use distinct or groupby

Disadvantage: need to relate
6. The advantage of anti paradigm is that it can avoid Association
7. In myslq, the index is implemented in the storage engine layer rather than the server layer
8. InnoDB uses b-tree index
Memory uses a hash index
9. Advantages of indexing

  • It greatly reduces the amount of data that the server needs to scan
  • It can help the server avoid sorting and temporary tables
  • Random I / O can be changed to sequential I / O

This work adoptsCC agreementReprint must indicate the author and the link of this article