|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
We have a system that was written with a few scalar UDF's.
These seem to perform very poorly, in that they get run per-row rather than set based (which is fine, and if it were up to me i would not use them). But what i was hoping for is a way to find operations in profiler that have a high execution count (5000, 10000, 100000) for a single query. Right now in profiler i include the execution plan with costs, and can go to each one looking at the execution plan for the number of executes. There already is "hash warning", "Scan begin", "missing statistics" events. Perhaps there is "executes warning"? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
> We have a system that was written with a few scalar UDF's.
> > These seem to perform very poorly, in that they get run per-row rather > than set based (which is fine, and if it were up to me i would not use > them). Nevermind. These UDF's are running during a "Compute Scalar" operation, which only ever has one execute. So even though in profiler i see it executing thousands of times (once for each row), it's really only executing once. So there's no way to profile by number of executes. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
No not directly. You would have to trace to a file and then parse the
results such that you can aggregate them up and get the totals. Have a look at this: http://www.cleardata.biz/cleartrace/ -- Andrew J. Kelly SQL MVP Solid Quality Mentors "Ian Boyd" <ian.msnews010@avatopia.com> wrote in message news:Ovswbte5IHA.5052@TK2MSFTNGP03.phx.gbl... >> We have a system that was written with a few scalar UDF's. >> >> These seem to perform very poorly, in that they get run per-row rather >> than set based (which is fine, and if it were up to me i would not use >> them). > > Nevermind. These UDF's are running during a "Compute Scalar" operation, > which only ever has one execute. > > So even though in profiler i see it executing thousands of times (once for > each row), it's really only executing once. > > So there's no way to profile by number of executes. > |
|
![]() |
| Outils de la discussion | |
|
|