DBA

Use (n)varchar(max) parameters only when you really need to.

The problem: I was checking the query store of a database where performance testing was done.The top CPU resource consumer was a simple query on 1 table with a perfect covering index, but the query plan looked more complicated than expected. The problem? The varchar(max) datatype of parameters in the query didn’t match the data […]

Use (n)varchar(max) parameters only when you really need to. Read More »

Need to quickly spot failed query’s in Query Store?

When I work with Query Store, I often need to find the executions that didn’t finish successfully, queries that were aborted or ended with an exception. In the SSMS interface, you’d normally look for a square icon (client-abort) or a triangle icon (runtime error) . Trying to find those by clicking through the dashboard is slow.

Need to quickly spot failed query’s in Query Store? Read More »

Verify “ApplicationIntent=ReadOnly”

Context A client used “ApplicationIntent=ReadOnly”  in their connection string, expecting queries to execute on the secondary read-only replica. Instead, the queries were executed on the primary database, leading them to suspect an Availability Group misconfiguration. Diagnostic To confirm whether the driver sent the read-only intent, we captured the “hadr_read_only_route_preconditions” Extended Event. This event records whether

Verify “ApplicationIntent=ReadOnly” Read More »

Scroll to Top