SQLAI.ai‘s tagline is that you can hook your database up to ChatGPT, and let it generate, explain and optimize queries. To see how it works, I hooked it up to…
For this week’s Query Exercise, we’re going to start with an existing query that has performance problems from time to time, depending on how it’s used. This query’s goal is…
Your Query Exercise was to find the best time to take the database offline for maintenance – the time when we’ve got the least load. We kept this one pretty…
When you wanna make big database deployments with as little downtime as possible, it’s time to learn to use Amazon’s fully managed blue/green deployments. If you’re not familiar with the…
If we’ve gotta take the database down for maintenance – perhaps a version upgrade, perhaps upgrading our own code, maybe scaling up the hardware – when’s the best time to…
Your Query Exercise was to find denormalization accuracy problems: checking the accuracy of a reporting column: posts.commentcount. There were two parts: finding the top 100 most problematic posts with the…
There’s a new PostgreSQL query optimization book out, The Ultimate Guide to Building Efficient Queries 2nd Edition by Henrietta Dombrovskaya, Boris Novikov, and Anna Bailliekova. You can start reading it…
For this week’s query challenge, we’re going to do some data validation. Pop open the Stack Overflow database and check out the commentcount column on the posts table: In theory,…
Your Query Exercise was to find foreign key problems: data that might stop us from successfully implementing foreign keys in the Stack Overflow database. Question 1: Write queries to find…
If you’ve heard the term “vacuum” and your eyes glaze over, watch the first 90 seconds of this YouTube video, and stop there. If you like what you’re learning and…