Perfomance tunning of SQL query which has Inner joins

  • Hi,

    I want to do Perfomance tunning of SQL query which has Inner joins.

    As this query is taking more time to run and is giving the error

    : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    so pls help me how to tune this query which has joins.

    Pls reply asap.

    Thanks in advance.

  • Big request with no information to work with. For better help fast, read the following article:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    😎

  • Sample Query, Data and DDL are required to answer your question.


    * Noel

  • ... And the execution plan from your own environment.

    "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

  • The query to be tunned is like this to

    select * from test.samp_id,test.b_id,

    case when (test.case_active='N' and sample.case_te_date is null)

    then 'In Active' when (not tbl_test.case_te_date is null)

    then 'Marked for Del' else 'Active'

    End as caseactiveyn,a.case_fi_num,test1.comments,test.case_desc,

    isnull(test.case_n_fname,'')+' '+isnull(test.case_n_miname,'')+' '

    +isnull(teste.case_n_lname,'')

    any suggesstion pls

  • Sorry to say this, but this doesn't even appear to be a proprerly written query.

    select * from test.samp_id,test.b_id,

    case when (test.case_active='N' and sample.case_te_date is null)

    then 'In Active' when (not tbl_test.case_te_date is null)

    then 'Marked for Del' else 'Active'

    End as caseactiveyn,a.case_fi_num,test1.comments,test.case_desc,

    isnull(test.case_n_fname,'')+' '+isnull(test.case_n_miname,'')+' '

    +isnull(teste.case_n_lname,'')

  • Its just an example thats it.

    It looks like this...

  • So you're asking for help tuning a query containing joins and you post a sample query with only the SELECT clause? How in the world are we supposed to help you? Please read the link that Lynn has posted and help us help you.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • anjan.ashok (6/11/2008)


    Its just an example thats it.

    It looks like this...

    An example of what? It isn't even a valid query. We'd like to help you, but you have to help us to do that.

    😎

  • atleast please post the join part of ur query and ur valid join conditions... cant do anything with that select query

Viewing 10 posts - 1 through 9 (of 9 total)

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