2 ms·
WITH RECOMPILE does opposite effect. It's kind of anti-hint. You force SQLServer to never use cached plans and regenerate query plan every time you run query.
by Ingaz 16y ago
WITH RECOMPILE does opposite effect. It's kind of anti-hint.
You force SQLServer to never use cached plans and regenerate query plan every time you run query. So you have always "plan generation overhead".
Also, such SP can have only 1 running example in server because of SP:Recomile Lock. Kind of singleton in SQLServer.