in

SQL Server Blogs

Voices from the UK SQL Server Community

Browse by Tags

  • BUG - Use of ranking functions result in an inefficient query plan

    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 similar queries: select ContactId , LastName...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Tue, Sep 8 2009
  • SQL and contiguous data ranges.

    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 if its part of the 20% of code executed 80% of the...
    Posted to SQL and the like (Weblog) by Anonymous on Thu, Aug 27 2009
  • Optimal Query Plans With Unbalanced Data Loads

    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 both of Erland Sommarskog’s articles The Curse and...
    Posted to SQL and the like (Weblog) by Anonymous on Thu, Aug 27 2009
  • Catch all queries and indexing

    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 there are occasions where that is not possible...
    Posted to SQL and the like (Weblog) by Anonymous on Thu, Aug 27 2009
  • Another TSQL random length random string generator

    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 SQLServer will create a hash join which will cause...
    Posted to SQL and the like (Weblog) by Anonymous on Thu, Aug 27 2009
Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems