After alter function execution paln did not change.
Alter FUNCTION dbo.F_New
(
@i integer
)
RETURNS DateTime
WITH SCHEMABINDING
AS
BEGIN
-- Convert with a deterministic style
RETURN CONVERT(datetime, '19000101', 112);
END;
GO
In the excecution plan posted, you seem to be using the function dbo.F. Could you post the execution plan before and after the change and any other relevant information? Also the execution plan might use different operators, even though you altered the function. Why do you want the execution plan to change?
– Randi VertongenJan 02 '19 at 08:35
You already have an optimal plan with a seek. Can you give "before" and "after" versions so we can see what you are testing. I assume this question is about this answer. https://dba.stackexchange.com/a/140382/3690
– Martin SmithJan 02 '19 at 14:12