Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combining a query and a function
Message
 
 
To
13/04/2010 18:00:46
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01460047
Message ID:
01460082
Views:
17
>>No, can you please just run the 3 together - this way we'll see how much % each cost.
>>
>>You can also try
>>
>>declare statements
>>
>>set statistics time on
>>
>>my query
>>
>>boris
>>
>>UDF
>>set statistics time off
>
>In order as mentioned:
>
>(93 row(s) affected)
>
> SQL Server Execution Times:
> CPU time = 0 ms, elapsed time = 0 ms.
>
>(93 row(s) affected)
>
> SQL Server Execution Times:
> CPU time = 0 ms, elapsed time = 0 ms.
>
>(93 row(s) affected)
>
> SQL Server Execution Times:
> CPU time = 16 ms, elapsed time = 186 ms.

Ok, this proved that UDF is the slowest thing and inline functions are much better using CROSS APPLY technique. Looks like George may want to update his blog.

BTW, take a look at the new variation I posted - I think Brad's code is easier to read than mine.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform