Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Microsoft SQL Server
>Sergey and Borislav
>
>Thanks for you input. Even with it as part of the original query, the delay was still there.
You'll be able to remove the delay with optimization techniques and adding indexes.
> Also, using it as a function, provides the ability to "reuse that code" in other queries, making maintenance easier.
I'm glad you got the performance to be better, but this is not the kind of reuse I find helpful with SQL. SQL cannot optimize UDFs and not only can it be painfully slow, but it can crash in the users' faces.
I wrote an article where I demonstrated an ability to combine segments of code from a table to build a new piece of code.
By using such a technique I was able to take a system that crashed after querying more than 2 weeks worth of data and taking a couple of minutes to do less than 2 weeks of data - to be blink-fast for more than 2 years of data.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement