feat: health check db

main
sudo pacman -Syu 2023-08-17 16:40:38 +07:00
parent 814838e5d4
commit 1d1c193c94
2 changed files with 22 additions and 0 deletions

View File

@ -240,6 +240,16 @@
>
</li>
</ul>
<h2>
<a
id="user-content-heathcheck"
class="anchor"
aria-hidden="true"
href="#heathcheck"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Heathcheck
</h2>
<p>Use <code>SELECT 1</code> to check if database failed yet.</p>
<h2>
<a id="user-content-tools" class="anchor" aria-hidden="true" href="#tools"
><span aria-hidden="true" class="octicon octicon-link"></span></a
@ -306,6 +316,13 @@
>How to read MySQL EXPLAINs</a
>
</li>
<li>
<a
href="https://brandur.org/fragments/database-health-check"
rel="nofollow"
>Honest health checks that hit the database</a
>
</li>
</ul>
<div>

View File

@ -110,6 +110,10 @@ database running the same time update it, for example create index, ...)
- [For MySQL 8.0](https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl-operations.html),
[Limitations](https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl-limitations.html)
## Heathcheck
Use `SELECT 1` to check if database failed yet.
## Tools
- Use [sqlfluff/sqlfluff](https://github.com/sqlfluff/sqlfluff) to check your
@ -125,3 +129,4 @@ database running the same time update it, for example create index, ...)
- [When to use JSON data type in database schema design?](https://shekhargulati.com/2022/01/08/when-to-use-json-data-type-in-database-schema-design/)
- [My Notes on GitLab Postgres Schema Design](https://shekhargulati.com/2022/07/08/my-notes-on-gitlabs-postgres-schema-design/)
- [How to read MySQL EXPLAINs](https://planetscale.com/blog/how-read-mysql-explains)
- [Honest health checks that hit the database](https://brandur.org/fragments/database-health-check)