SQL Server TKPROF interface...
Posted on 2010-08-30
I am trying to demonstrate to coders that correct approaches are priceless and in Oracle this is very simple. SQL Server not so much (for me of course).
If you execute:
that should have a very different "detailed" execution plan than
@v_Sysdate as smalldatetime = GETDATE;
Just trying to show the folks the internals so say, "hey, this is more maintainable, scalable, performance oriented, etc."
How can I do this? How do I show that SQL Server would only get sysdate once (well GETDATE() once in SQL Server) with the declaration and 3 times with the first query?
Maybe this isn't the best example but I am trying to illustrate from a simple query to get these folks on board with correct coding paradigms.
Please help me illustrate how this is accomplished in SQL Server.
Thanks in advance,