MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
Performance issue - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

Performance issue

Last post 06-11-2008 2:59 AM by TLG. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-09-2008 6:39 AM

    • dgagne
    • Top 500 Contributor
    • Joined on 06-09-2008
    • Posts 1

    Performance issue

    I have 2 identical Hardware servers. They were bot purchased and set up the same exact way. They are HP  DL 580 G5, 64-bit  EM64t/x64 with 16 CPU's running at 2.9GHz with 64 GB RAM.   Both have SQL Server 2005 installed. SQL Server has a max memory setting of 52GB. Both servers have a database called OLAP which were created identical and have been loaded with the same backup copy of a SQL Server 2000 Database.

    I am executing a not so well written query on each server. I am not looking at tuning this query, it is software generated. But on one server the query returns in 1 second. On the second server it return in 10 minutes and 30 seconds.  The execution plan is different. I am at a total loss here.

    This is the Query

    SELECT F.DATASOURCE_NUM_ID, F.INTEGRATION_ID, F.ROW_WIDFROM WC_EPCR_BOOKING_DETAIL_F F (NOLOCK) JOIN WC_EPCR_PARAM_G P (NOLOCK) ON 1=1 WHERE F.ORDER_DATE_WID >= P.THIRTY_DAYS_AGO_START_WID AND NOT EXISTS ( SELECT FS.CTRLNUM FROM WC_EPCR_BOOKING_DETAIL_SEATS_FS FS (NOLOCK) WHERE F.INTEGRATION_ID = FS.SOURCE+UPPER(FS.CTRLNUM)+CONVERT(VARCHAR(5), FS.LINE_NO))

    The server that executes this in one second has an execution plan of:

    Select ----- Nested Loops  ------ Nested Loops ------------ Nested Loops ------------ Table Scan 23%

                           |                            |                                  |

                           |                            |                            Nested Loops ----------  Compute Scalar  ------- Constant Scan

                           |                     RID Lookup 23%                 |

                           |                                                         Index Seek 23%

                        Top  -------  Table Scan 32%

     

    The server that executes this in 10 min 30 seconda has an execution plan of:

    Select  ------------ Nested Loops  11%  ----------------------  Nested Loops 11%  ------------------  Table Scan

                            Left Anti Semi Join                                   Inner Join

                                       |                                                        |

                                       |                                            Nested Loops 0%  ------------- Compute Scaler 0%  --------------- Constant Scan 0%

                                       |                                                        |

                                       |                                                  Index Seek 19%

                                       |

                                    Top 21% -----  Table Scan  39%

     

    The three tables have:

    WC_EPCR_BOOKING_DETAIL_F  - 2,108,463 rows

    WC_BOOKING_DETAIL_SEATS_FS - 37,008 rows

    WC_EPCR_PARAM_G - 1 row  (Yes, that is ONE row)

     

    I realize there is probably not enough infor here to give me a 100% reason why. But if someone can tell me what to look for, what to lookat, etc. to start figuring out there is such a major difference, I would appreciate it.

    All the SQL Server configuration parameters are EXACTLY the same.

    I did notice that the one thing different is the Statistics are very differetn on each of the 3 tables. I have run Update statistic severla times with FULL SCAN on both servers.

    Disk drives are all in a SAN and have been configured exactly the same.

    Separate LUNS for TEMP Database, Data Files, Log Files, Operating system, SQL Server Installation and binaries, pagefile, backups

    C: Operating system RAID 1

    D: SQL Server Install - RAID 1

    M: TEMP Database - RAID 10

    L: Logs - RAID 1

    S: Data - RAID 10

    Z: Backups - RAID 5

    P: and F: Pagefile - RAID 0

    Database is roughly 300GB

  • 06-09-2008 7:22 AM In reply to

    • aprato
    • Top 10 Contributor
    • Joined on 12-01-2007
    • Greater Boston
    • Posts 239

    Re: Performance issue

     Hi

    Did you try updating the usage counts and statistics on the server having trouble? 

  • 06-11-2008 2:59 AM In reply to

    • TLG
    • Top 500 Contributor
    • Joined on 06-11-2008
    • Posts 1

    Re: Performance issue

    Hi

    This will probably be of no help but that we are experiencing something similar in attempting to migrate a set of databases from 2000 to new clustered server 2005. Some views show a vast improvement in performance (as expected) others are extreemly slow (similar to your experience).

     This is such a problem it will delay our migration... The only observation I have made so far is that the query will occupy 1 processor 100% but not be shared as expected...work in progress..

    If as and when I find any answers to our problems i will let you know - just in case.

    regards TLG

Page 1 of 1 (3 items)