The REPL: Issue 82 - June 2021
source link: https://ylan.segal-family.com/blog/2021/07/01/the-repl-issue-82-june-2021/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
The REPL: Issue 82 - June 2021
Jul 1, 2021 • Ylan Segal • the repl
EXPLAIN ANALYZE in PostgreSQL and how to interpret it
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.
Do You Need Redis? PostgreSQL Does Queuing, Locking, & Pub/Sub
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.
Stop worrying about PostgreSQL locks in your Rails migrations
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 ActiveRecord::Migration
uses.
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK