feat: more tips

main
sudo pacman -Syu 2024-04-20 23:38:27 +07:00
parent 3c07cdd377
commit 77dfe4039c
4 changed files with 15 additions and 0 deletions

View File

@ -255,6 +255,7 @@
and make sure size of value will never hit the limit. Prefer
<code>TEXT</code> if you don't care, just want to store something.
</p>
<p>If you need to store UUID, use <code>VARCHAR(255)</code>.</p>
<div class="markdown-heading">
<h2 class="heading-element"><code>LIMIT</code></h2>
<a
@ -408,6 +409,11 @@
>Why are database columns 191 characters?</a
>
</li>
<li>
<a href="https://stackoverflow.com/a/43056611" rel="nofollow"
>Store UUID v4 in MySQL</a
>
</li>
</ul>
<div>

View File

@ -482,6 +482,11 @@
>
</li>
<li><a href="https://www.monolisa.dev/" rel="nofollow">MonoLisa</a></li>
<li>
<a href="https://connary.com/cartograph.html" rel="nofollow"
>Cartograph</a
>
</li>
</ul>
<div class="markdown-heading">
<h2 class="heading-element">Tools</h2>

View File

@ -114,6 +114,8 @@ Prefer `VARCHAR` if you need to query and of course use index, and make sure
size of value will never hit the limit. Prefer `TEXT` if you don't care, just
want to store something.
If you need to store UUID, use `VARCHAR(255)`.
## `LIMIT`
Prefer `LIMIT 10 OFFSET 5` to `LIMIT 5, 10` to avoid misunderstanding.
@ -149,3 +151,4 @@ Use `SELECT 1` to check if database failed yet.
- [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)
- [Why are database columns 191 characters?](https://www.grouparoo.com/blog/varchar-191)
- [Store UUID v4 in MySQL](https://stackoverflow.com/a/43056611)

View File

@ -183,6 +183,7 @@ have money:
- [PragmataPro](https://fsd.it/shop/fonts/pragmatapro/)
- [Berkeley Mono Typeface](https://berkeleygraphics.com/typefaces/berkeley-mono/)
- [MonoLisa](https://www.monolisa.dev/)
- [Cartograph](https://connary.com/cartograph.html)
## Tools