• I've attached the execution plans for both the function and the run-in-console modes.