June 3, 2008 at 2:04 am
Hi,
I wanted to look at the execution plan for a scalar function but all it returns is a 'Constant Scan' at 100%. Will the queries within a scalar function still be optimized to use indexes etc?
Thanks.
June 3, 2008 at 9:41 pm
See SET SHOWPLAN ON in BOL. Also in Profiler, under the Performance event, check out Execution Plan, Show Plan All, Show Plan Statistics and Show Plan Text.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 4, 2008 at 1:14 am
Thanks for the reply. I can already see the execution plan, my question is why doesn't it show anything useful. All it shows is that SQL Server is doing a constant scan. I want to know if the queries within the scalar function are using indexes. Is this something specific to scalar functions?
Thanks.
June 4, 2008 at 2:32 am
It's how scalar functions show up in exec plans. Very irritating.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply