can I tune this

  • Hi All,

    I have a query where I am joining 6 tables and getting nearly 10,000 records in 1.30 minutes.I need to tune the query because while exporting the data to excel. Am getting error.Below is sample query

    Select b.col1,d.col2,f.col3,d.col4,e.col5,f.col6

    from a inner join b on a.col7=b.col7 inner join c on b.col8=c.col9 left join

    d on c.col9=d.col10 left join e on d.col11=e.col12 left join f on

    e.col13=f.col14 inner join g on g.col15=a.col16

    where a.col17=val and g.col18=val2

    Thanks In Advance

    Subrat.

  • Subrat

    "Am getting error" is not helpful. Please post the actual query and the error message.

    John

  • If you want help in tuning, please post execution plans, query, table definition, index definitions. See http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi ,

    Am getting Timeout Error...

    Thanks

    Subrat

  • It's impossible to suggest anything to you without more information. The execution plan and a complete table structure are the minimum we need to begin to make even somewhat intelligent suggestions.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply