If you write queries – and forgive me, because I know that sounds like everyone, and that’s because it is – then you need to know how Postgres handles nulls.…
This week’s query exercise asked you to find two kinds of locations in the Stack Overflow database: Locations populated with users who seem to be really helpful, meaning, they write…
For this week’s Query Exercise, let’s start by taking a look at the Users table to see what we’re dealing with: PgSQL select u.location, count(*) as population, avg(u.reputation) as AvgReputation…
Our challenge from last week was that the developers were complaining about a slow query in the Stack Overflow database that wasn’t as fast as they’d like. PgSQL select *…
The best single-page guide to query tuning that I’ve ever seen, for any database platform, dropped this week from Francesco Tisiot of EverSQL. It’s one hell of a long page,…
Our developers have come to us with a problem query in the Stack Overflow database that isn’t as fast as they’d like. PgSQL select * from users where length(displayname) >…
If your Postgres database gets queried by multiple app servers, you’re probably going to want a connection pooler. Michael Aboagye explains what that is and why you want one. When…
When you have a slow query, and you want to see which parts of the plan took the longest or had the least accurate estimates, try pasting the plan into…
Your challenge for this week was to improve estimation on a query. Stack Overflow has a dashboard that shows the top-ranking users in their most popular location. The Stack Overflow…
Your challenge for this week is to tune a query. Say Stack Overflow has a dashboard that shows the top-ranking users in their most popular location. The Stack Overflow database…