Tuning

Advertisements

This page will have a Performance Tuning PT start points.

Setup WhoisActive –> https://www.sqlserverblogforum.com/dba/whoisactive-capturing-a-sql-server-queries-performance-tuning/

Performance Tuning general check overview –> https://www.sqlserverblogforum.com/dba/performance-tuning-series-main-part/

Reading execution plan quickly–> https://www.sqlserverblogforum.com/dba/reading-execution-plan-sql-server-use-of-plan-explorer/

Physical join understanding–> https://www.sqlserverblogforum.com/sql-party/merge-join-vs-hash-join-vs-nested-loop-join/

4 Comments

  • sureshT

    Hi Muthu,

    I am one the favorite reader your blog.
    I need your help regarding the performance tuning.
    The following query is occupied the space on tempdb by Sort operation. hence the wait type of “IO_Complition” is taking 2 minutes.
    Please suggestion which combination of index or approch to ignore the sort operation.

    Select
    From List L (nolock)
    Inner join contact c (nolock)on l.campaignid = c.campaignid and l.listid = c.listid
    Where C.CAMPAIGNID = ‘AB2’
    and c.calltype = 0
    and c.status = 0
    and. c.isfress = 1
    Order by L.listid desc,C.PRIORITY asc,c.LASTACCESSED asc,c.CONTACTID asc

    The total records is 1 crores on contact table and for particular campaignid of AB2 is retuning 10 lacks.
    The toal records is 100 records on list table.
    both table are heap table only.
    Data type of those columns
    Campaignid – nvarchar(64)
    listid – int
    calltype – int
    status – int
    isfress – bit
    priority – int
    lastaccessed – datetime
    contactid – int

  • Muthukkumaran Kaliyamoorthy

    From the code. you need following to be indexed and if you have any columns in the select list add it in the include clasue.

    contact Table
    ON clause: ([campaignid],[calltype],[status],[isfress])
    Include clause: listid, PRIORITY, LASTACCESSED, CONTACTID

    List table
    On clause:[campaignid],listid

    Example:
    Create index ix_contact ON contact ([campaignid],[calltype],[status],[isfress])
    include (listid, PRIORITY, LASTACCESSED, CONTACTID)

    • Suresh

      Hi Muthu,

      I am struggling the performance related issues. It will be very help full if you share contact number.
      Also interesting to join the class if you are provide training regarding the same.

Leave a Reply

%d bloggers like this: