Browse by Tags
All Tags »
TSQL »
SQLServerPedia Syndication (
RSS)
In SQL2005 (9.00.4207.00), if you use a ranking function within a view or CTE, then an inefficient query plan can be produced. First off in Adventure works create this index Create Index idxLastName on Person . Contact ( LastName ) and then consider these...
As the saying goes "work smarter, not harder", this is definitely the case for SQL. If you have a poorly performing query, then you are not only affecting that one user but diverting precious machine resources needlessly. This is doubly true...
Sql Server is great at producing and caching efficient query plans. However these plans may not be the most efficient based upon the parameters passed into subsequent calls off a stored procedure. In this article I am assuming that you have read...
Amongst many others, Gail Shaw has blogged on the subject of catch all queries . On many occasions I have needed to do something similar and found performance to be pretty dire on large tables. Typically I would use dynamic SQL to generate the query but...
The following function function will return you a random string of the specified characters, for a length of between @StrLenLo and @StrLenHi. The only ‘Oddity’ with using this function is that if the parameters are not dependant upon data within a table...