Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Query Performance: CXPACKET Expand / Collapse
Author
Message
Posted Wednesday, April 30, 2014 12:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, August 10, 2014 1:16 PM
Points: 3, Visits: 5
Hello,

I am running a query for which Waittype is CXPACKET, query does join two tables and insert the data into another table. I ensured to have the good space in TempDB physical drive however as the query progress, it goes in KBs and finally query fails with Transaction log full.

Server has 32 Cores with 64 Logical processors and has 768 Gig RAM. "Cost Threshold for Parallelism" set to 50 and MAXDOP set to 48. I read through about "Cost Threshold for Parallelism" but quite confused about MAXDOP.

Could you please help me set up the MAXDOP please

Thanks!
Post #1566223
Posted Wednesday, April 30, 2014 12:43 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 8:05 AM
Points: 42,829, Visits: 35,959
Ignore the CX packet and tune the query. Look for waits that the query incurs other than CX packet.

If you want specific help, please post the query, table and index definitions and the execution plan.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1566228
Posted Wednesday, April 30, 2014 12:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, August 10, 2014 1:16 PM
Points: 3, Visits: 5
Attached is the execution plan and I am trying to see in which way creating indexes might help.

  Post Attachments 
Exec_Plan.sqlplan (8 views, 248.02 KB)
Post #1566232
Posted Wednesday, April 30, 2014 1:13 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 8:05 AM
Points: 42,829, Visits: 35,959
Table definitions, index definitions, the query itself and the actual execution plan (not estimated)


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1566240
Posted Wednesday, April 30, 2014 2:30 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 7:55 AM
Points: 15,662, Visits: 28,055
According to the statistics you're moving 197 million rows with no where clause. Don't bother with an index. It won't do any good. As currently built out, there's almost nothing you can do here to improve performance except buy bigger and better hardware. I would suggest considering some type of filtering. You can't even apply an index to the grouping because it's across 15 or so columns from two tables.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1566262
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse