Category: My SQL

  • InnoDB Engine

     InnoDB is a general-purpose storage engine that balances high reliability and high performance. In MySQL 8.0, InnoDB is the default MySQL storage engine. Unless you have configured a different default storage engine, issuing a CREATE TABLE statement without an ENGINE= clause creates an InnoDB table. Key Advantages of InnoDB

  • Best Practices for InnoDB Tables

  • InnoDB Multi-Versioning

     InnoDB is a multi-versioned storage engine: it keeps information about old versions of changed rows, to support transactional features such as concurrency and rollback. This information is stored in the tablespace in a data structure called a rollback segment (after an analogous data structure in Oracle). InnoDB uses the information in the rollback segment to perform the undo operations needed in a…

  • MySQL Physical (Raw) Vs Logical Backups

     Physical backups consist of raw copies of the directories and files that store database contents. This type of backup is suitable for large, important databases that need to be recovered quickly when problems occur. Logical backups save information represented as logical database structure (CREATE DATABASE, CREATE TABLE statements) and content (INSERT statements or delimited-text files). This type of…

  • MySQL Full Vs Incremental Backups

     A full backup includes all data managed by a MySQL server at a given point in time. An incremental backup consists of the changes made to the data during a given time span (from one point in time to another). MySQL has different ways to perform full backups, such as those described earlier in this…

  • MySQL Full Versus Point-in-Time (Incremental) Recovery

     A full recovery restores all data from a full backup. This restores the server instance to the state that it had when the backup was made. If that state is not sufficiently current, a full recovery can be followed by recovery of incremental backups made since the full backup, to bring the server to a…

  • SHOW PROCESSLIST Statement

     The MySQL process list indicates the operations currently being performed by the set of threads executing within the server. The SHOW PROCESSLIST statement is one source of process information. For a comparison of this statement with other sources, see Sources of Process Information. If you have the PROCESS privilege, you can see all threads, even those belonging to other users.…

  • MySQL Uptime

     MySQL Uptime  SELECT   VARIABLE_VALUE AS Uptime_seconds,   NOW() AS “Now”,   NOW() – INTERVAL VARIABLE_VALUE SECOND AS “Up since”,   DATEDIFF(NOW(), NOW() – INTERVAL VARIABLE_VALUE SECOND) AS “Uptime_days” FROM performance_schema.session_status WHERE VARIABLE_NAME = ‘Uptime’; Output Example: +—————-+———————+—————————-+————-+ | Uptime_seconds | Now                 | Up since       …

  • MySQL join_buffer_size, sort_buffer_size, read_buffer_size and read_rnd_buffer_size

    join_buffer_size,  sort_buffer_size,  read_buffer_size  read_rnd_buffer_size These four buffers are allocated per connection. So think twice before alerting. For example, if you set join buffer size=2 M and max connections=800, MySQL will allocate an extra 2 M per connection (2 M x 800). The same is true for the remaining three buffers. Again, everything is per-connection. In almost…