Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining a query and a function
Message
 
 
À
13/04/2010 18:00:46
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01460047
Message ID:
01460082
Vues:
18
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform