Query Performance Improvement

Proposed Answer Query Performance Improvement

All Replies

  • Tuesday, June 12, 2012 9:35 AM
     
     Proposed Answer

    We cannot say anything on this unless you provide some more details like table structures, index definitions, number of rows in each of the tables and in the resultset etc.

    And also I don't like the CASE expression inside your ROW_NUMBER function. The query engine cannot identify any useful indexes (if any) for processing the query. A better way is to use dynamic SQL approch

    The Curse and Blessings of Dynamic SQL (Erland's article)


    Krishnakumar S

    • Proposed As Answer by SQL_Learn Tuesday, January 29, 2013 4:57 PM
    •  
  • Tuesday, June 12, 2012 5:06 PM
     
     

    Issue resolved?

    Regards
    satheesh

  • Wednesday, June 13, 2012 6:44 AM
     
     
    not resolved.have took off the actual query.
  • Wednesday, June 13, 2012 6:50 AM
     
     Proposed Answer

    Hi,

    How forum users will be able to give you suggestions, unless you don't show your code or some posting your issue?

    Regards
    satheesh

    • Proposed As Answer by SQL_Learn Tuesday, January 29, 2013 4:58 PM
    •