docs (level 101): fix typos, punctuation, formatting (#160)

* docs: formatted for readability

* docs: rephrased and added punctuation

* docs: fix typos, punctuation, formatting

* docs: fix typo and format

* docs: fix caps and formatting

* docs: fix punctuation and formatting

* docs: capitalized SQL commands, fixed puntuation, formatting

* docs: fix punctuation

* docs: fix punctuation and formatting

* docs: fix caps,punctuation and formatting

* docs: fix links, punctuation, formatting

* docs: fix code block formatting

* docs: fix punctuation, indentation and formatting
This commit is contained in:
Jana R
2024-07-28 17:38:19 +05:30
committed by GitHub
parent bdcc6856ed
commit 4239ecf473
58 changed files with 1522 additions and 1367 deletions

View File

@@ -1,8 +1,8 @@
* Explain and explain+analyze
EXPLAIN <query> analyzes query plans from the optimizer, including how tables are joined, which tables/rows are scanned etc.
`EXPLAIN <query>` analyzes query plans from the optimizer, including how tables are joined, which tables/rows are scanned, etc.
Explain analyze shows the above and additional info like execution cost, number of rows returned, time taken etc.
`EXPLAIN ANALYZE` shows the above and additional info like execution cost, number of rows returned, time taken, etc.
This knowledge is useful to tweak queries and add indexes.
@@ -12,7 +12,7 @@
* [Slow query logs](https://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html)
Used to identify slow queries (configurable threshold), enabled in config or dynamically with a query
Used to identify slow queries (configurable threshold), enabled in config or dynamically with a query.
Checkout the [lab section](https://linkedin.github.io/school-of-sre/level101/databases_sql/lab/) about identifying slow queries.
@@ -20,27 +20,23 @@
This includes creation and changes to users, like managing privileges, changing password etc.
* Backup and restore strategies, pros and cons
Logical backup using mysqldump - slower but can be done online
- Logical backup using `mysqldump` - slower but can be done online
Physical backup (copy data directory or use xtrabackup) - quick backup/recovery. Copying data directory requires locking or shut down. xtrabackup is an improvement because it supports backups without shutting down (hot backup).
Others - PITR, snapshots etc.
- Physical backup (copy data directory or use XtraBackup) - quick backup/recovery. Copying data directory requires locking or shut down. XtraBackup is an improvement because it supports backups without shutting down (hot backup).
- Others - PITR, snapshots etc.
* Crash recovery process using redo logs
After a crash, when you restart server it reads redo logs and replays modifications to recover
After a crash, when you restart server, it reads redo logs and replays modifications to recover
* Monitoring MySQL
Key MySQL metrics: reads, writes, query runtime, errors, slow queries, connections, running threads, InnoDB metrics
- Key MySQL metrics: reads, writes, query runtime, errors, slow queries, connections, running threads, InnoDB metrics
Key OS metrics: CPU, load, memory, disk I/O, network
- Key OS metrics: CPU, load, memory, disk I/O, network
* Replication
@@ -49,7 +45,7 @@
* High Availability
Ability to cope with failure at software, hardware and network level. Essential for anyone who needs 99.9%+ uptime. Can be implemented with replication or clustering solutions from MySQL, Percona, Oracle etc. Requires expertise to setup and maintain. Failover can be manual, scripted or using tools like Orchestrator.
Ability to cope with failure at software, hardware and network level. Essential for anyone who needs 99.9%+ uptime. Can be implemented with replication or clustering solutions from MySQL, Percona, Oracle, etc. Requires expertise to setup and maintain. Failover can be manual, scripted or using tools like Orchestrator.
* [Data directory](https://dev.mysql.com/doc/refman/8.0/en/data-directory.html)
@@ -57,7 +53,7 @@
* [MySQL configuration](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html)
This can be done by passing [parameters during startup](https://dev.mysql.com/doc/refman/5.7/en/server-options.html), or in a [file](https://dev.mysql.com/doc/refman/8.0/en/option-files.html). There are a few [standard paths](https://dev.mysql.com/doc/refman/8.0/en/option-files.html#option-file-order) where MySQL looks for config files, `/etc/my.cnf` is one of the commonly used paths. These options are organized under headers (mysqld for server and mysql for client), you can explore them more in the lab that follows.
This can be done by passing [parameters during startup](https://dev.mysql.com/doc/refman/5.7/en/server-options.html), or in a [file](https://dev.mysql.com/doc/refman/8.0/en/option-files.html). There are a few [standard paths](https://dev.mysql.com/doc/refman/8.0/en/option-files.html#option-file-order) where MySQL looks for config files, `/etc/my.cnf` is one of the commonly used paths. These options are organized under headers (`mysqld` for server and `mysql` for client), you can explore them more in the lab that follows.
* [Logs](https://dev.mysql.com/doc/refman/5.7/en/server-logs.html)