How to Avoid N+1 Queries: Comprehensive Guide and Python Code Examples
This article describes the N+1 problem that we often find when developers use row by row solutions for querying related data in a database.
2023-06-21
4,757 reads
This article describes the N+1 problem that we often find when developers use row by row solutions for querying related data in a database.
2023-06-21
4,757 reads
We need to monitor our servers, but individual metrics have more complexity than just setting simple limits for their readings.
2023-02-06 (first published: 2023-01-30)
318 reads
Today Grant wonders why we spend so much time trying to learn about query tuning.
2022-07-23
300 reads
2022-03-09
539 reads
This guide describes how to identify and resolve latch contention issues observed when running SQL Server applications on high concurrency systems with certain workloads.
2021-08-30
In the last year I’ve published articles on indexes to include Indexes: When Column Selectivity Is Not Always A Requirement – SQLServerCentral and Query Optimizer Suggests Wrong Index and Query Plan -- Why? – SQLServerCentral. This article is a continuation of just how the optimizer interacts with the index wizard. We’ve all heard and read […]
2021-07-07
3,724 reads
Brent Ozar discusses performance tuning and how From the outside it looks more complicated than it is, but at the end of the day, it always comes back to just 3 knobs and knowing which ones you can turn.
2020-02-07
Introduction Fill Factor is a parameter most of us have ignored because there is no definitive way to calculate what the correct value should be. Part 1 of this series describes a new technique to dynamically determine index fill factors for all indexes within a database. Part 2 covers an analysis of the data collection […]
2019-08-27
3,950 reads
This week Steve is wondering if you know how to use waits and queues for troubleshooting.
2019-08-23
645 reads
Introduction So what’s all the fuss about Fill Factor? It is a SQL Server parameter I’ve ignored for 20+ years. The main reason was/is I’ve had no idea about what value to use. There is just no documented definitive guidance. Back in April at SQL Saturday #830 - Colorado Springs, I attended two sessions by […]
2019-08-20
8,901 reads
By HeyMo0sh
As someone who’s worked with data for over 20 years and with many cloud...
By HeyMo0sh
2025 belongs to the AI startups. If you peek into the tech headlines, you’ll...
By Vinay Thakur
it has been a year since i have not written much on the blog...
Comments posted to this topic are about the item A Quick Restore
Comments posted to this topic are about the item Guarding Against SQL Injection at...
I have a quick question on Ola Hallengren Index Optimize Maintenance . Do we...
While doing some testing of an application, I wanted to reset my environment after doing some testing with this code:
USE DNRTest BACKUP DATABASE DNRTest TO DISK = 'dnrtest.bak' GO /* Bunch of stuff tested here */RESTORE DATABASE DNRTest FROM DISK = 'dnrtest.bak' WITH REPLACEWhat happens if this runs, assuming the "bunch of stuff" isn't anything affecting the instance. See possible answers