3
votes
1answer
224 views

How Can the Same Query in Two Nearly Identical Instances Generate Two Different Execution Plans?

Server A and Server B have identical hardware and instance configurations (A is Production, B is QA). B's DBs were restored from A's backups from one week ago. I was provided this query by the ...
3
votes
1answer
991 views

CROSS APPLY-ing a parameterised function

Given the following definitions: CREATE TABLE MyTable ( col1 int, col2 int, col3 int, col4 int ) CREATE FUNCTION fn_MyFunction ( @Param1 int, @Param2 int ) RETURNS TABLE AS ...