Recent Articles - Databases

Calculating Table Size in MySQL
Calculating Table Size in MySQL
Sep 15, 2022 · 2 min read

Knowing how much disk space individual tables take up is important for DB maintenance and debugging, and it can be accomplished with a single query in MySQL.


The Dangers of OFFSET With MySQL
The Dangers of OFFSET With MySQL
Jul 28, 2022 · 15 min read

Large limit offsets degrade the performance of most databases, but it is especially egregious in MySQL.


Deferrable Constraints in PostgreSQL
Deferrable Constraints in PostgreSQL
Jun 20, 2022 · 9 min read

Constraints in PostgreSQL are validated immediately row-by-row by default, which might be confusing when updating multiple values in columns that have a uniqueness constraint.


Investigating Locks in MySQL
Investigating Locks in MySQL
Jun 17, 2022 · 8 min read

Locking is an important part of an ACID-compliant database, but excessive locks can lead to performance degradation. Here are some strategies for investigating locks in MySQL.


Inner vs. Outer Joins
Inner vs. Outer Joins
Apr 29, 2022 · 7 min read

They can't be used interchangeably, and the differences are important.


Creating a MySQL REPL Playground in Docker
Creating a MySQL REPL Playground in Docker
Apr 27, 2022 · 4 min read

It's helpful to have local throwaway environments for rapid development, especially with databases, and creating one for MySQL is a snap with Docker.


Creating a PostgreSQL REPL Playground in Docker
Creating a PostgreSQL REPL Playground in Docker
Apr 27, 2022 · 3 min read

It's helpful to have local throwaway environments for rapid development, especially with databases, and creating one for PostgreSQL is a snap with Docker.


Creating a Gremlin REPL Playground in Docker
Creating a Gremlin REPL Playground in Docker
Apr 22, 2022 · 4 min read

Apache TinkerPop's Gremlin graph traversal language can be confusing to learn, but thankfully TinkerPop provides some "toy" graphs perfect to learn with.


Finding Long-Running Queries in MySQL
Finding Long-Running Queries in MySQL
Dec 22, 2021 · 4 min read

Poorly optimized queries and excessive connections can cause problems in MySQL, here's a quick way to identify and kill them.


Finding Long-Running Queries in PostgreSQL
Finding Long-Running Queries in PostgreSQL
Nov 26, 2021 · 2 min read

Poorly optimized queries and excessive connections can cause problems in PostgreSQL, here's a quick way to identify and kill them.


Calculating Table Size in PostgreSQL
Calculating Table Size in PostgreSQL
Nov 26, 2021 · 2 min read

Knowing how much disk space individual tables take up is important for DB maintenance and debugging, and it can be accomplished with a single query in PostgreSQL.


Making UUIDs More Performant in MySQL
Making UUIDs More Performant in MySQL
Nov 14, 2020 · 3 min read

MySQL does not have a native UUID type, so strings are often used instead, which come with large storage and performance costs.