Plurrrr

a tumblelog
Wed 03 Mar 2021

Query Optimization in Postgres with pg_stat_statements

"I want to work on optimizing all my queries all day long because it will definitely be worth the time and effort," is a statement that has hopefully never been said. So when it comes to query optimizing, how should you pick your battles? Luckily, in PostgreSQL we have a way to take a system-wide look at database queries:

  • Which ones have taken up the most amount of time cumulatively to execute
  • Which ones are run the most frequently
  • And how long on average they take to execute

And that's just a few places you can shine a light on, using pg_stat_statements.

Source: Query Optimization in Postgres with pg_stat_statements, an article by Kat Batuigas.

(Dis)Honest Functions

After a recent debugging session, discovering I had once again been the victim of a dishonest function signature, I was... Well, let’s just say I was unimpressed. Two thoughts popped up in my head – the first one was «ahh.. this thing again..», and the second was «wait, why is this still even a thing?». It left me in a state of frustration.

Source: (Dis)Honest Functions, an article by Bendik Solheim.