I’ve been working on web applications for a long time. From time to time I am called upon to figure out (and optimize) performance issues on some query.
EXPLAIN ANALYZE lets you see what Postgres is doing under the hood. I don’t do this often enough to remember all the detail of what all the information returned means. This article explains the basics of
EXPLAIN ANALYZE and links to some handy tools that help you focus on what matters.
It’s no secret that I like Postgres a lot. This article explains some common use cases for Redis, and how Postgres can take care of them instead. It resonates with me, especially for smaller projects were the techniques outlined can avoid using another data store.
To round off today’s Postgres love, this blog post introduces how the
safe-pg-migrations gem can help when running migrations for databases with high-load and/or a lot of data. Traditionally, those operations can be problematic because of how Postgres acquires locks and can bring production sites down. The specifics are explained in detail in the post. The
safe-pg-migrations gem manages to turn what would be complicated steps to ensure safe migrations into the same exact semantics that
As soon as I tried this gem, I ran into an issue. The maintainer was very helpful. It turns out Ruby 3.0 support was pending. A few days later my issue was resolved.