Presentation is loading. Please wait.

Presentation is loading. Please wait.

SQL Server 2005 Performance Enhancements for Large Queries Joe Chang

Similar presentations


Presentation on theme: "SQL Server 2005 Performance Enhancements for Large Queries Joe Chang"— Presentation transcript:

1 SQL Server 2005 Performance Enhancements for Large Queries Joe Chang jchang6@yahoo.com www.sql-server-performance.com/joe_chang.asp

2 When & Why Migrate to 2005 Performance gains in large queries In memory Disk performance Data Warehouse Applications Easiest to migrate Usually internal users Read-only queries

3 TPC-H benchmark Decision Support Large volumes of data Complex queries – 22 queries, 2 data refresh Power & Throughput metrics Power – run 1 queries at a time Throughput – run multiple concurrent streams

4 System Details 2003 Oct: SQL Server 2000 EE build 782 16 Itanium 2 1.5GHz/6M, 64GB, 215 disks 2004 Aug: Oracle 10g EE 16 Itanium 2 1.5GHz/6M, 64GB, 166 disks Unisys ES7000 Aries 420 2005 Jun: SQL 2005 HP Integrity rx8620 16 Itanium 2 1.6GHz/9M, 64GB, 342 disks 2005 Jul: Oracle 10g R2 - 236 disks OS: Windows Server 2003 Datacenter, SP1 for last

5 TPC-H 1000GB Results PowerThroughputComposite SQL 20007,330.63,687.45,199.1 Oracle 10g13,614.27,131.39,853.3 SQL 2005*19,241.09,666.313,637.8 Oracle 10g R2*20,385.311,140.415,069.9 S2K5 SP1*23,346.313,458.617,725.9 *1.6GHz/9M processor, others: 1.5GHz/6M

6 TPC-H 1000GB - Power Q1Q2Q3Q4Q5Q6Q7Q8Q9 Q10Q11Q12Q13Q14Q15Q16Q17Q18 Q19Q20Q21Q22 SQL 20002530.860.2873.2807.41058.770.8838.2822.85085.8 655.4224.5666.0728.7149.4110.9269.1181.33214.4 283.2125.73489.6156.3 Oracle 10g1068117.579.284334.467420.7242.31268 189.6172.8182.8125148.5122.9227.9372.72146 460.1156.31908189.2 SQL 2005987.326.259.276.4235.749236.9163.91084 104.7112.4292405.774.142.1210.490.51456 19376.41686182.6 10X

7 TPC-H 1000GB - Power

8 TPC-H 1000GB - Throughput Q1Q2Q3Q4Q5Q6Q7Q8Q9 Q10Q11Q12Q13Q14Q15Q16Q17Q18 Q19Q20Q21Q22 SQL 20007111523.7489238165009185.355452052624341 22411464367753201108884.63057519815299 7042402915943643.4 Oracle 10g43941294501366.51909252.5259424965748 1137866.313153857262.3639.5770.6173321580 114012369459791.5 SQL 20055460197.1148616402447161.4186123116464 1857100615552256580.4253.682116304126 103723765320644.1

9 TPC-H 1000GB - Throughput

10 TPC-H Query 1 SQL 2000 to 2005 2.56X Power 1.30X Throughput SELECT L_RETURNFLAG,L_LINESTATUS,SUM(L_QUANTITY) AS SUM_QTY, SUM(L_EXTENDEDPRICE) AS SUM_BASE_PRICE, SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)) AS SUM_DISC_PRICE, SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)*(1+L_TAX)) AS SUM_CHARGE, AVG(L_QUANTITY) AS AVG_QTY,AVG(L_EXTENDEDPRICE) AS AVG_PRICE, AVG(L_DISCOUNT) AS AVG_DISC,COUNT(*) AS COUNT_ORDER FROM LINEITEM WHERE L_SHIPDATE <= DATEADD(dd, -90, cast('1998/12/01' as smalldatetime)) GROUP BY L_RETURNFLAG,L_LINESTATUS ORDER BY L_RETURNFLAG,L_LINESTATUS

11 TPC-H Query 3 SQL 2000 to 2005 14.7X Power 3.3X Throughput SELECT TOP 10 L_ORDERKEY, SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)) AS REVENUE, O_ORDERDATE,O_SHIPPRIORITY FROM CUSTOMER INNER JOIN ORDERS ON C_CUSTKEY = O_CUSTKEY INNER JOIN LINEITEM ON L_ORDERKEY = O_ORDERKEY WHERE C_MKTSEGMENT = 'BUILDING' AND O_ORDERDATE '1995-03-15' GROUP BY L_ORDERKEY,O_ORDERDATE,O_SHIPPRIORITY ORDER BY REVENUE DESC,O_ORDERDATE

12 Query 8 SQL 2000 to 2005 5.0X Power 8.9X Throughput

13 10GB Line Item in memory test SQL Server 2000 SP4 Query time in milli- seconds versus Max Degree of Parallelism Limited parallelism gains beyond 4-8P SQL Server 2005 June CTP Continued parallelism gains beyond 4P

14 10GB Line Item in memory test 1 SQL Server 2000 SP4 Query time in milli- seconds versus Max Degree of Parallelism Limited parallelism gains beyond 4-8P SQL Server 2005 June CTP Continued parallelism gains beyond 4P

15 10GB Line Item in memory test 2 SQL Server 2000 SP4 Query time in milli- seconds versus Max Degree of Parallelism Limited parallelism gains beyond 4-8P SQL Server 2005 June CTP Continued parallelism gains beyond 4P

16 10GB in memory test Max Degree of Parallelism 1 Max DOP 4 Max DOP 16 30% reduction in total time at 1P 50% reduction in total time at 16P

17 In-Memory Table Scan Xeon systems have better table scan performance on SQL 2000 SQL 2000 default table scan performance depends on build

18 Table Scan to Disk SQL 2005 Table Scan performance probably limited by disk system

19 Loop Join – SQL 2000 & 2005 SQL 2000 SQL 2005 No scaling from 1-2P Better overall performance, scaling from 1-8P

20 Hash Join SQL 2000 SQL 2005 Unpredictable behavior below 3M rows Limited scaling Consistent behavior < 1M rows Not as much fall off in large joins

21 Merge Join – SQL 2000 SQL 2005 does not use parallel merge joins? Slight decrease in non-parallel performance. SQL 2000 parallel merge joins has serious problems, runs slower, consumes more CPU. It should be possible to performance a parallel merge efficiently?

22 LiteSpeed Backup Performance HP rx8620, 16 x 1.5GHz Itanium 2 processors 2 EVA 5000 (4 HSV110 controllers, 8 enclosures x14 disks each 8 x 2Gbit/sec FC ports

23 SQL 2005 Performance Summary Significant improvements in large queries Data Warehouse Applications Improved disk performance

24 More Information www.sql-server-performance.com/joe_chang.asp SQL Server Quantitative Performance Analysis Server System Architecture Processor Performance Direct Connect Gigabit Networking Parallel Execution Plans Large Data Operations Transferring Statistics SQL Server Backup Performance with LiteSpeed jchang6@yahoo.com

25 System Configuration

26 Bookmark Lookup Performance SQL 2005 has better bookmark lookup performance to Clustered Indexes SQL 2000 has better bookmark lookup performance to Heap organized tables


Download ppt "SQL Server 2005 Performance Enhancements for Large Queries Joe Chang"

Similar presentations


Ads by Google