I am trying to understand what gets cached in a stored procedure, when the stored procedure has (for example) 3 query statements, and one of those query statements has an OPTION (RECOMPILE) hint?
Let's say that the OPTION (RECOMPILE) hint is on Query statement #3. While Query statements #1 and #2 do not have any hints and nothing is inhibiting statements #1 and #2 from being cached.
In the stored procedure plan that gets cached, do we find Query statements #1 and #2, but NOT #3?