Press "Enter" to skip to content

ABORT_QUERY_EXECUTION in SQL Server 2025

Joey D’Antoni pulls out the big guns:

However, SQL Server 2025 gives us a bigger hammer (DBAs love hammers). Building on top of the query store hints feature that was added in SQL Server 2022, ABORT_QUERY_EXECUTION simply blocks the exection of known problematic queries.

Read on to see how this works. Note that it will prevent the query from running at all, ever. As a result, if your main concern is “Hey, don’t run this during the busiest hours of the data for this database,” this particular hint is overkill.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.