sql server parallel data warehouse(pdw)...
TRANSCRIPT
SQL Server Parallel Data Warehouse(PDW)
Appliance
한국마이크로소프트(유)
Senior Premier Field Engineer 이준규 부장
목차
• PDW 소개
• PDW 하드웨어
• PDW 소프트웨어
• PDW 쿼리 실행
• PDW 관리
• PDW 지원모델 및 로드맵
SQL Server Parallel Data Warehouse
높은 수준의
DW 아키텍처 MPP(Massively Parallel Processing) 기반 Shared Nothing 아키텍처를 통한 성능 개선
다양한 시스템 선택 옵션을 제공함으로써 비즈니스 변화에 유연성 있는 아키텍처 제공
확장성
단일 Full Data Rack 에서 최대 150TB 까지 지원하며, 최대 4개의 Full Data Rack 에서 600TB
까지 확장 가능, Half Rack 구성 가능
Distributed Data Warehouse Architecture로 Remote SMP로 빠르게 데이터 전송 가능(Remote
Table Copy)
안정성 높은 수준의 보안과 엔지니어링 프로세스를 검증받은 SQL Server 기반 플랫폼, T-SQL 사용
검증된 구성을 통한 위험요소 최소화 (HP/DELL에서 설계한 Reference Architecture 기반)
가용성 HPC / Clustering 기술을 적용하여 PDW 의 주요 노드들은 가용성 확보
시스템, 네트워크, 주요 부품들은 모두 이중화 구성
성능 사용자 쿼리, 모니터링, 백업, 데이터 적재 ETL과 관련된 서버를 물리적으로 분리하여 동시성
및 성능 향상
사용자 쿼리, 데이터 적재시에 병렬 데이터 처리를 통한 성능 향상
SQL Server DW MPP Appliance
Tier 1 Enterprise Data Warehouse Appliance Offering
목차
• PDW 소개
• PDW 하드웨어
• PDW 소프트웨어
• PDW 쿼리 실행
• PDW 관리
• PDW 지원모델 및 로드맵
Hardware Architecture
Compute Servers Storage Nodes Compute Nodes Storage Nodes
Spare Compute Node
Control Nodes
Landing Zone
Backup Node
SQL
Management Nodes
Client Drivers
ETL Load Interface
Corporate Backup Solution
Support / Patching
Dual In
finib
and
SQL
SQL
SQL
SQL
SQL
SQL
SQL
SQL
SQL
SQL
Dual Fib
er
Channel
Hardware Architecture
Control Rack Data Rack Control node (Master Node) • 클라이언트 App과의 연결이 이루어지는 곳
• MPP 엔진이 위치
• 모든 노드의 DMS (Data Movement Services) 제어
• 시스템 메타 데이터 저장
• Active/Passive Cluster 형태로 가용성 제공
Management node • Windows 도메인 컨트롤러 위치 (Active Directory)
• S/W 업그레이드와 패치 적용에 대한 공간
• S/W의 Re-image를 위한 S/W image 저장
Landing Zone • 데이터 적재를 위한 스테이징 공간
• 외부 네트워크에서 접속 가능
• 3rd Party H/W 및 S/W와 확장 가능함
Backup node • 백업 파일 저장
• 외부 네트워크에서 접속 가능
• 3rd Party H/W 및 S/W와 확장 가능함
Compute node • 로컬 쿼리 처리를 수행함
• DMS (Data Movement Service) 구동
• 외부 네트워크에서 접속 불가
• Active Node와 Spare Node(Passive)로 구성
목차
• PDW 소개
• PDW 하드웨어
• PDW 소프트웨어
• PDW 쿼리 실행
• PDW 관리
• PDW 지원모델 및 로드맵
Software Architecture
Windows 2008 EE
With MSCS
Windows 2008 EE
With MSCS
SQL Server
Windows 2008 EE
With MSCS
SQL Server
Windows 2008 EE
With MSCS
SQL Server
Windows 2008 EE
With MSCS
SQL Server
Windows 2008 EE
With MSCS
SQL Server
Windows 2008 EE
With MSCS
SQL Server
Windows 2008 EE
With MSCS
SQL Server
Windows 2008 EE
With MSCS
SQL Server
Windows 2008 EE
With MSCS
SQL Server
DMS
DWAgent
DMS
DWAgent
DMS
DWAgent
DMS
DWAgent
DMS
DWAgent
DMS
DWAgent
DMS
DWAgent
DMS
DWAgent
DMS
DWAgent
DMS
DWAgent
SQL Server
Master
Master
Master
Master
Master
Master
Master
Master
Master
Master User
Database
User Database
User Database
User Database
User Database
User Database
User Database
User Database
User Database
User Database
Windows 2008 EE
Windows 2008 EE
Windows 2008 EE
Windows 2008 EE
With MSCS
IIS
Admin Console
DMS
SQL OS
SQL OS
SQL OS
DSQL Core Engine
Services DMS
Manager
Client
Control Rack
DW Configuration
DW Diagnostics
DW Queue
Master
Control Rack – Passive Node
DW Agent DMS SSIS DW Loader 3rd party Solution
Landing Zone
HPC AD DW Agent
Management Node
DMS DWAgent
Backup Node
JDBC/OLE-DB/ODBC/ADO.NET
IIS DW SQL Nexus Query Tool 3rd party
BI Solution
PDW Engine
SQL Server
DW Agent
Compute Rack
Control Rack Active Node
Compute Node : Database Physical Design
LUN1 LUN2 LUN3 LUN4 LUN5 LUN6 LUN7 LUN8
Us
er
Da
tab
as
e
RAID GP01 RAID GP02 RAID GP03 RAID GP04
UDB Replicated FG
UDBRepl.ndf
FG UDB_Dist A
UDBDist.ndf
UDBRepl.ndf UDBRepl.ndf UDBRepl.ndf UDBRepl.ndf UDBRepl.ndf UDBRepl.ndf UDBRepl.ndf
FG UDB_Dist B
UDBDist.ndf
FG UDB_Dist C
UDBDist.ndf
FG UDB_Dist D
UDBDist.ndf
FG UDB_Dist E
UDBDist.ndf
FG UDB_Dist F
UDBDist.ndf
FG UDB_Dist G
UDBDist.ndf
FG UDB_Dist H
UDBDist.ndf
LUN 9
Log
LUN 10
RAID GP05
Replicated vs Distributed Table
• Replicated Table – PDW Appliance의 각 Compute Node에 동일한 데이터를 중복으로 저장하는
Table
– 데이터양이 적은 Dimension Table
• Distributed Table – 모든 Compute Node내의 여러개의 Distribution에 Hash Algorithm에 의해서
데이터를 중복없이 분산시켜 놓는 Table
• Compute Node 당 8개의 Distribution이 존재 (8개의 물리적인 Table이 존재)
• 각 Distribution 하위에 Partitioning을 적용할 수 있음
– 데이터 양이 많은 Fact Table
Replicated vs Distributed Table
Date Dim
Date Dim ID
Calendar Year
Calendar Qtr
Calendar Mo
Calendar Day
Store Dim
Store Dim ID
Store Name
Store Mgr
Store Size
Item Dim
Prod Dim ID
Prod Category
Prod Sub Cat
Prod Desc
Sales Fact
Date Dim ID
Store Dim ID
Prod Dim ID
Mktg Camp Id
Qty Sold
Dollars Sold
Promo Dim
Mktg Camp ID
Camp Name
Camp Mgr
Camp Start
Camp End
DD
SD
ID
M
D
SF
1
DD
SD
ID
PD
SF
2
DD
SD
ID
PD
SF
3
DD
SD
ID
PD
SF
4
DD
SD
ID
PD
SF
5
DD
SD
ID
PD
SF
1
Distributed Table with Partitioning
CREATE TABLE myTable (column Defs)
WITH ( DISTRIBUTION = HASH (id),
CLUSTERED INDEX (shipdate),
PARTITION (shipdate
RANGE RIGHT FOR VALUES
('1992-01-01', '1992-02-01', '1992-03-01', '1992-04-01', ... )));
하나의 Distribution 하위에
Partition 생성
Create Table <table GUID>_a
Create Table <table GUID>_b
…
Create Table <table GUID>_h
Partition function
Compute Node 하나당
8개의 Distribution 생성
Data Loading & Data Movement Service
Data Rack Control Rack
Control Node
Landing Zone
Compute Nodes Storage Nodes
Infi
nib
an
d
Load
File/SSIS
DMS Ser er PDW Engine
Load
Manager
DMS
Manager DMS
SQL
Server
Load
Client
DMS
DMS
Converter Sender
Receiver Writer
DMS
Converter Sender
Receiver Writer
(1) DWLoader/
SSIS 실행
(3) DMS 가
데이터를 읽은 후
buffers
Records를
Compute
Node들에게
round-robin
방식으로
데이터를 전달
(2) Load Manager
가 Staging
Table을 생성
(4) 각 row은 bulk insert를
위해서 Convert 되고
Distribution Column을
기준으로 Hashing됨
(5) Hashed row가 적절한
Compute Node의
Receiver에 전달됨
(6) 각 Row가
Staging Table에
bulk insert됨 SSIS
API Distributor
목차
• PDW 소개
• PDW 하드웨어
• PDW 소프트웨어
• PDW 쿼리 실행
• PDW 관리
• PDW 지원모델 및 로드맵
Query Execution Architecture
SQL Server PDW Appliance
Query Execution Architecture
Shell Appliance & Cost-Based Query Optimizer
Shell Appliance
(SQL Server)
Engine Service
ME
MO
Compute Node
(SQL Server)
Compute Node
(SQL Server)
Compute Node
(SQL Server)
Co
ntro
l No
de
foo foo foo
foo
Query Execution Architecture
1. 사용자가 쿼리를 실행
2. sp_showmemo_xml 저장 프로시저를 통해서 쿼리가 Shell Appliance에 전달
– SQL Server (Shell Appliance)가
parsing, binding, authorization을 수행
– SQL Optimizer가 execution
alternatives를 생성
3. Candidate plans, histograms, data types
을 포함하고 있는 MEMO가 생성됨
4. Parallel Execution Plan 이 생성됨
5. Parallel Execution Plan이 Compute
Node들에서 실행됨
6. 결과값이 사용자에게 전달됨
Shell Appliance
(SQL Server)
Engine Service
ME
MO
Compute Node
(SQL Server)
Compute Node
(SQL Server)
Compute Node
(SQL Server)
Co
ntro
l No
de
SELECT SELECT
Return
Query Execution Process
• SQL operations – SQL을
Computed Node들에게 전달하는 operation
• DMS operations – 쿼리 단계와 Join을 만족시키기 위해서
Node간에 데이터가 이동하는
operation
• Temp table operations – 임시테이블을 저장하는 operation
• Return operations – 데이터를
Client에 전달하는 operation
Execution Plan operation
Query Execution Process
• DMS Query Plan Operation
• SQL & Other Query Plan Operation
Operation Name
OpType Name for EXPLAIN
Description
PartitionMoveOperation
PARTITION_MOVE
Distributed Table에서 Control Node의 Table로 데이터를 이동 Control Node에서의 Aggregation을 위해서 사용됨
ShuffleMoveOperation
SHUFFLE_MOVE
Distributed Table에 대한 Redistribution 작업 Distribution/Aggregation incompatible을 해결하기 위해서 다른 Distribution Key로 데이터를 Redistribution하는데 사용됨
BroadcastMoveOperation BROADCAST_MOVE Distributed 된 데이터를 Replicated Table로 이동
ReturnOperation
RETURN Control Node로 부터 사용자에게 쿼리 결과를 전달하는 작업 Parallel Query Plan의 마지막에 발생하는 작업
Operation Name
OpType Name for EXPLAIN
Description
OnOperation
ON
Database 혹은 Object에 대해서 수행됨 DMS operations이 끝난 이후나 DMS operation이 필요하지 않는 Query에 대해서 수행됨 예를 들어 Create Table, Create Index, Drop Table, Drop View 등
RandomIDOperation
RND_ID
Unique Name을 만드는 작업. Temporary Table의 Random name을 생성하는데 사용되며 항상 Control Node에서 수행됨
Query Execution Plan
• Show Execution Plan EXPLAIN
SELECT FirstName, LastName FROM DimCustomer WHERE CustomerKey = 15775;
Estimated execution plan
Actual execution plan
Distribution Compatibility
Distribution Compatible
• 쿼리가 각각의 Compute Node로 부터
결과값을 받아서 추가 작업없이 결과를
사용자에게 전달할 수 있는 경우
• Distribution Compatible한 쿼리의 일반적인 예는 다음과 같음
– 단일 Table에 대한 단순 Select 쿼리
– Distribution Key가 Join이나
Grouping에 대한 컬럼으로 사용되는 경우
– Distribution Table과 Replicated
Table간의 Inner Join이 되는 경우
Distribution Incompatible
• 쿼리로 인해 각각의 Compute Node간에 데이터의 이동이 필요한 경우
• Distribution Incompatible한 쿼리의 일반적인 예는 다음과 같음
– Distribution Key가 아닌 컬럼으로
Group By를 수행하는 단순한
Select 구문
– Distribution Key가 Join이나
Grouping에 대한 컬럼으로 사용되지 않는 경우
– Replicated Table이 Distributed
Table에 대해서 Left Outer Join이
되는 경우
PDW Join Type
• Distribution Compatibility를 위해서 수행되는 PDW Query Execution Plan은 아래와 같은 Join Type를 사용
Shared Nothing Join
• SQL Join 절에
Compatible Distribution
Key를 사용하여
Distribution
Compatibility하게
만드는 경우
Ultra Shared Nothing Join
• Replicated Table이
존재하여 Distribution
Compatibility하게
만드는 경우
Redistribution Join
• Distribution
Compatibility를 위해서
Compute Node간에
동적 데이터 이동이
필요한 경우
Ultra Shared Nothing
No
de 1
• Join Type: Ultra Shared Nothing
– Replicated / Distributed
• Distribution: Compatible
– Replicated Table과 Distribution
Table의 Join
– Store Sales Distribution Key(ss_k
ey)는 사용되지 않음
• Streaming Results
– 결과값이 Client에 바로 전달
– Control Node에서 Aggregation 작업 없음
Item_key Color
1 Red
2 Green
3 Blue
4 Yellow
Item Dim
ss_key Item_key Qty
1 1 5
3 3 10
5 4 12
7 2 7
Store Sales
SELECT ss_key, Qty
FROM item_dim a
JOIN store_sales b
ON a.item_key = b.item_key
WHERE a.color = ‘Yellow’
Result
Set
5,12
Final Result Set
5,12 : 6,17
Result
Set
6,17 N
od
e 2
Item Dim
ss_key item_key Qty
2 1 3
4 3 11
6 4 17
8 2 1
Store Sales
\
Item_key Color
1 Red
2 Green
3 Blue
4 Yellow
Ultra Shared Nothing
FactInternetSales_CK
SalesOrderNumber
CustomerKey (DistributionKey)
SalesAmount
DimCustomer
CustomerKey
FirstName
LastName
SELECT fisc.CustomerKey
,fisc.SalesOrderNumber
,cus.FirstName + ' ' + cus.LastName AS CustomerName
,fisc.SalesAmount
FROM FactInternetSales_CK fisc
INNER JOIN DimCustomer cus
ON fisc.CustomerKey = cus.CustomerKey
WHERE cus.CustomerKey = 11000
Replicated Table Distributed Table
Ultra Shared Nothing
• DimCustomer (Replicated Table)과 FactInternetSales_CK(Distributed Table)의 Inner Join
• FactInternetSales_CK Table의 Distribution Key와 관계없이 Compute Node의 모든
Distribution에서 ReturnOperation만 수행
Ultra Shared Nothing
• Compute Node 01의 8개의 Distribution에서 ReturnOperation만 수행하는 실행 계획
Shared Nothing
No
de
1
ss_key Qty
1 5
3 10
5 12
7 7
Store Sales
SELECT a.color , b.Qty
FROM web_sales a
JOIN store_sales b
ON ws_key = ss_key
WHERE a. color = ‘Red’
Result
Set
Red,5
No
de 2
Final Result Set
Red,5 : Red,3
Result
Set
Red,3
ss_key Qty
2 3
4 11
6 17
8 1
Store Sales
Distributed Tab
le
ws_key Color Qty
1 Red 15
3 Blue 20
5 Yellow 22
7 Green 17
Web Sales
ws_key Color Qty
2 Red 13
4 Blue 21
6 Yellow 27
8 Green 11
Web Sales
Distributed Table
• Join type: Shared Nothing
– Distributed / Distributed
– Data Type이 동일한 Compatible Distribution Keys(ss_key, ws_key)를 사용하여 Join을 수행
– 결과값이 Client에 바로 전달
– Control Node에서 Aggregation 작업 없음
Shared Nothing
FactInternetSales_SON
SalesOrderNumber (DistributionKey)
CustomerKey
SalesAmount
FactInternetSalesReason_SON
SalesOrderNumber (DistributionKey)
SalesReasonKey
SELECT fiso.CustomerKey
,fiso.SalesOrderNumber
,fiso.SalesAmount
,fisro.SalesReasonKey
FROM FactInternetSales_SON fiso
INNER JOIN FactInternetSalesReason_SON fisro
ON fiso.SalesOrderNumber = fisro.SalesOrderNumber
WHERE fiso.CustomerKey = 11000
Distributed Table Distributed Table
Shared Nothing
• Distribution Table인 FactInternetSales_SON과 FactInternetSalesReason_SON간의 Join
• Compute Node의 모든 Distribution에서 ReturnOperation만 수행
Shared Nothing
• Compute Node 01의 8개의 Distribution에서 ReturnOperation만 수행하는 실행 계획
Aggregation Compatibility
Aggregation Compatible
• Sum, Count, Avg등의 Aggregation
Function 값이 각각의 Compute
Node에서 계산 완료되어 Control
Node에서 추가적인 작업이 필요하지
않은 경우
• Group by 절에 Distribution Key 속성이
포함되어 있는 경우
Aggregation Incompatible
• 각각의 Compute Node에서 사전
Aggregation이 필요
• 최종적인 Aggregation을 위해서 Control
Node로 데이터를 이동하는
PartitionMove가 필요한 경우
Shared Nothing – Aggregation Compatibility
• Join Type: Shared Nothing
– Distributed / Distributed
• Distribution Compatible
– Data Type이 동일한 Compatible
Distribution Keys(ss_key, ws_key)
를 사용하여 Join을 수행
• Aggregation Compatible
– Distribution Key(ws_key)가 Group b
y 절에서 사용됨
• Streaming Results
– 결과값이 Client에 바로 전달
– Control Node에서 Aggregation 작업
없음
No
de 1
ss_key Qty
1 5
3 10
5 12
7 7
Store Sales
SELECT a.ws_key, sum(a.qty), sum(b.qty)
FROM web_sales a
JOIN store_sales b
ON a.ws_key = b.ss_key
WHERE a.color = ‘Red’
GROUP BY a.ws_key
Result
Set
1,15,5
Result
Set
2,13,3
No
de
2
ss_key Qty
2 3
4 11
6 17
8 1
Store Sales
ws_key Color Qty
1 Red 15
3 Blue 20
5 Yellow 22
7 Green 17
Web Sales
ws_key Color Qty
2 Red 13
4 Blue 21
6 Yellow 27
8 Green 11
Web Sales
Distributed Table Distributed Table
Final Result Set
1,15,5 : 2,13,3
Shared Nothing – Aggregation Incompatibility
• Join Type: Shared Nothing
– Distributed / Distributed
• Distribution Compatible
– Data Type이 동일한 Compatible
Distribution Keys(ss_key, ws_key)
를 사용하여 Join을 수행
• Aggregation Incompatible
– Distribution Key가 아닌 color가
group by 절에 존재
• Partition Move to Control Node
– 일부의 Aggregation이 Compute
Node에서 수행된 후 Control Node
에 Partition Move를 통해서 데이터를 전달
– 최종적인 Aggregation이 Control
Node에서 수행
No
de 1
ss_key Qty
1 5
3 10
5 12
7 7
Store Sales
SELECT a.color ,sum(a.qty), sum(b.qty)
FROM web_sales a
JOIN store_sales b
ON a.ws_key = b.ss_key
WHERE a.color = ‘Red’
GROUP BY a.color
Result Set
Red, 15, 5
Final Result Set
Red, 39, 9
Result Set
Red, 24, 4
No
de 2
ss_key Qty
2 3
4 11
6 17
8 1
Store Sales
ws_key Color Qty
1 Red 15
3 Blue 20
5 Yellow 22
7 Green 17
Web Sales
ws_key Color Qty
2 Red 13
4 Blue 21
6 Yellow 27
8 Red 11
Web Sales
Distributed Table Distributed Table
Shared Nothing – Aggregation Incompatibility (PartitionMove)
FactInternetSales_SON
SalesOrderNumber (DistributionKey)
CustomerKey
SalesAmount
FactInternetSalesReason_SON
SalesOrderNumber (DistributionKey)
SalesReasonKey
SELECT fiso.CustomerKey
,SUM(fiso.SalesAmount) AS fiso_SalesAmount
FROM FactInternetSales_SON fiso
INNER JOIN FactInternetSalesReason_SON fisro
ON fiso.SalesOrderNumber = fisro.SalesOrderNumber
WHERE fiso.CustomerKey = 11000
GROUP BY fiso.CustomerKey
Distributed Table Distributed Table
Shared Nothing – Aggregation Incompatibility (PartitionMove)
• Distribution Table인 FactInternetSales_SON과 FactInternetSalesReason_SON간의 Join
• Group by 절의 CustomerKey가 Distribution Key가 아니어서 DMS Engine에 의해서 Control Node로
PartitionMove 발생. 이후 Control Node에서 Group by Aggregation 후 ReturnOperation 수행
Shared Nothing – Aggregation Incompatibility(PartitionMove)
• 각 Compute Node의 Distribution에서 PartitionMove 수행
• Customer Key가 11000인 데이터는 Distribution ID 16, 26에만 존재함
Distribution Compatibility
• A Redistribution Shuffle은 Distribution Compatible을 위해서 다른 Distribution
Key로 데이터를 Redistribution 하기 위한 PDW operation임
• Shuffle 은 Query의 Join절을 만족시키기 위해서 하나의 테이블의 데이터를
Redistribution 하는 작업
• Multi-shuffle 은 Query의 Join절을 만족시키기 위해서 하나 이상의 테이블의
데이터를 Redistribution 하는 작업
Redistribution Shuffle for Distribution Incompatible Joins
Distribution Compatibility - ShuffleMove
No
de 1
ss_key VID Qty
1 11 5
6 32 10
2 54 12
8 78 7
Store Sales
SELECT vs_key, a.ord, b.qty
FROM vendor_sales a
JOIN store_sales b
ON a.vs_key = b.VID
WHERE a. color = ‘Red’
No
de 2
ss_key VID Qty
5 21 3
4 42 11
3 63 17
7 84 1
Store Sales
vs_key Color Ord
11 Red 15
32 Blue 20
54 Yellow 22
78 Green 17
Vendor Sales
vs_key Color Ord
21 Red 13
42 Blue 21
63 Yellow 27
84 Green 11
Vendor Sales
Distributed Table Distributed Table
ss_key VID Qty
1 11 5
3 63 17
5 21 3
7 84 7
ss_key VID Qty
2 54 12
4 42 11
6 32 10
8 78 1
Distribution Compatibility - ShuffleMove
• Join Type: Redistribution
– Distributed / Distributed
• Distribution Incompatible
– Store_Sales Table의 경우
Distribution Key(ss_key)가 Join 절에서 사용되지 않고 VID 컬럼이 사용됨
• Shuffle-Move Operation
– Store_Sales Table의 데이터를 VID
를 기준으로 Redistribution하여
Distribution Compatibility를 확보
• Streaming Results
– 결과값이 Client에 바로 전달
– Control Node에서 Aggregation 작업
없음
No
de 1
ss_key VID Qty
1 11 5
6 32 10
2 54 12
8 78 7
Store Sales
SELECT vs_key, a.ord, b.qty
FROM vendor_sales a
JOIN store_sales b
ON a.vs_key = b.VID
WHERE a. color = ‘Red’
Result S
et
11,15, 5
Final Result Set
11,15,5 : 21,13,3
Result S
et
21,13, 3
No
de 2
ss_key VID Qty
5 21 3
4 42 11
3 63 17
7 84 1
Store Sales
vs_key Color Ord
11 Red 15
32 Blue 20
54 Yellow 22
78 Green 17
Vendor Sales
vs_key Color Ord
21 Red 13
42 Blue 21
63 Yellow 27
84 Green 11
Vendor Sales
Distributed Table Distributed Table
Shared Nothing – Aggregation Incompatibility(ShuffleMove)
FactInternetSales_SON
SalesOrderNumber (DistributionKey)
CustomerKey
SalesAmount
FactInternetSalesReason_SON
SalesOrderNumber (DistributionKey)
SalesReasonKey
SELECT fiso.CustomerKey
,SUM(fiso.SalesAmount) AS fiso_SalesAmount
FROM FactInternetSales_SON fiso
INNER JOIN FactInternetSalesReason_SON fisro
ON fiso.SalesOrderNumber = fisro.SalesOrderNumber
GROUP BY fiso.CustomerKey
Distributed Table Distributed Table
Shared Nothing – Aggregation Incompatibility(ShuffleMove)
• Distribution Table인 FactInternetSales_SON과 FactInternetSalesReason_SON간의 Join
• Group by 절의 CustomerKey가 Distribution Key가 아니어서 DMS Engine에 의해서 각각의 Compute Node간에
Customer Key를 Distribution Key로 하여 ShuffleMove 발생. 이후 Compute Node에서 ReturnOperation 수행
Shared Nothing – Aggregation Incompatibility(ShuffleMove)
• 각 Compute Node의 Distribution에서 ShuffleMove 수행을 위해서 읽기 작업 수행
• 특정한 Where 조건이 없으므로 모든 Distribution에서 데이터를 읽음
Shared Nothing – Aggregation Incompatibility(ShuffleMove)
• 각 Compute Node의 Distribution에서 ShuffleMove 수행을 위해서 쓰기 작업 수행
• 특정한 Where 조건이 없으므로 모든 Distribution에 데이터를 씀
BroadcastMove
FactInternetSales_CK
CustomerKey ( DistributionKey )
SalesOrderNumber
SalesAmount
FactInternetSalesReason_SRK
SalesReasonKey (DistributionKey)
SalesOrderNumber
SELECT fisc.CustomerKey
,fisc.SalesOrderNumber
,fisc.SalesAmount
,fisrc.SalesReasonKey
FROM FactInternetSales_CK fisc
INNER JOIN FactInternetSalesReason_SRK fisrc
ON fisc.SalesOrderNumber =
fisrc.SalesOrderNumber
WHERE fisc.CustomerKey = 11000
Distributed Table Distributed Table
BroadcastMove
• FactInternetSales_CK 에서 조회된 결과를 Replicated Table로 생성 (BroadcastMoveOperation)
• FactInternetSalesReason_SRK 과 조인 후 ReturnOperation
BroadcastMove
• FactInternetSales_CK 에서 CustomerKey=11000인 데이터를 Read
BroadcastMove
• Compute Node의 Distribution에 Replicated Table로 Write
BroadcastMove + ShuffleMove
FactInternetSales_SON
SalesOrderNumber ( DistributionKey )
EmployeeKey
OrderDateKey
ProductKey
SalesAmount
FactSalesQuota_SQK
SalesQuotaKey (DistributionKey)
EmployeeKey
DateKey
SalesAmountQuata
SELECT frso.ProductKey
,SUM(frso.SalesAmount)
,SUM(fsq.SalesAmountQuota)
FROM FactResellerSales_SON frso
INNER JOIN FactSalesQuota_SQK fsq
ON frso.EmployeeKey = fsq.EmployeeKey
AND frso.OrderDateKey = fsq.DateKey
GROUP BY frso.ProductKey
Distributed Table Distributed Table
BroadcastMove + ShuffleMove
• FactSalesQuota_SQK 에서 조회된 결과를 Replicated Table로 생성 (BroadcastMoveOperation)
• FactInternetSalesReason_SRK 과 조인하여 ProductKey기준으로 필요한 데이터를 재배치 (ShuffleMove)
작업 후 ReturnOperation
BroadcastMove + ShuffleMove
• FactSalesQuota_SQK 에서 데이터를 Read (BroadcastMove)
BroadcastMove + ShuffleMove
• Compute Node의 Distribution에 Replicated Table로 Write (BroadcastMove)
BroadcastMove + ShuffleMove
• FactInternetSalesReason_SRK 과 조인 후 ProductKey기준으로 데이터 Read (ShuffleMove)
BroadcastMove + ShuffleMove
• Compute Node의 Distribution에 필요한 데이터 Write (ShuffleMove)
Statistics
CREATE TABLE FactInternetSales_SON_STAT
WITH (
DISTRIBUTION = HASH (SalesOrderNumber),
CLUSTERED INDEX (SalesOrderNumber ASC)
)
AS SELECT *
FROM dbo.FactInternetSales;
create statistics ProductKey on dbo.FactInt
ernetSales_SON_STAT (ProductKey);
• Statistics 생성/갱신 작업은 PDW 수준에서 아래와 같이 관리
• SQL Server와 동일하게 Index 생성시 Statistics는 자동으로 생성
• 갱신 및 관리는 관리자에 의해서 수행
목차
• PDW 소개
• PDW 하드웨어
• PDW 소프트웨어
• PDW 쿼리 실행
• PDW 관리
• PDW 지원모델 및 로드맵
Appliance Monitoring
PDW Admin Console
대시보드 쿼리 활동성 데이터 로드 활동성 백업 및 복구 모니터링 활성화된 Locks 활성화된 세션 경고 / 알림 Appliance 상태
PDW/Proliant SCOM(System Center Operation Manager) Pack
HW 및 SW 구성요소에 대한 Health 정보
전체 서버에 대한 계층화된 뷰 제공 주요 상태 정보 - Appliance view - Appliance nodes view - Alerts view
네트워크에 대한 모니터링 포트/인터페이스 프로세서 메모리 연결성 (Connection Health) VLAN 건강상태 HSRP 그룹
프로세서 메모리 논리디스크 실제디스크 네트워크어댑터
네트워크 모니터링
DW Appliance 모니터링
윈도우 서버 모니터링
서버 부품 모니터링
서버 부품 및 장애 모니터링
알림/경고메세지
관리자 모니터링
• PDW Admin Console에서 세션, 쿼리, 데이터적재, 백업/복원, 잠금, 리소스사용량, Appliance 상태 등을 모니터링
• PDW Management Pack for SCOM 2007 와 Proliant Management Pack for SCOM 2007 을 통해 윈도우 서버 모니터링, 네트워크 모니터링, DW Appliance 모니터링, 서버 장애 및 부품 모니터링을 제공
• 알림/경고/감지 메시지를 스케줄링을 통해 관리자에게 통보.
목차
• PDW 소개
• PDW 하드웨어
• PDW 소프트웨어
• PDW 쿼리 실행
• PDW 관리
• PDW 지원모델 및 로드맵
Support Model
HP Response Center
• 상시 전화 대기 및 긴급 전화 지원
• 장애 로그 분석
• 원인 분석
• 복구 계획 수립
HP 원격 인프라 지원
• 이벤트 로깅 및 HP Call Center 자동 전송
• IRS 기반 원격지원 (서버,스토리지,네트워크 및 어플리
케이션)
• Phone Home 기반 원격지원(일부기종)
• 상시 구성 정보 수집, 패치 정보 수집
• Critical 장애 발생시 즉시 원격 로그인
MS Premier Mission Critical(PMC)
• 한국 Microsoft 인력으로 전담 엔지니어 지정
• PDW Health Check 지원
• 30분내 장애 응답 (전담 전화 번호 제공)
• 장애 Escalation 프로세스 (한국 -> 미국)
• 미국 본사 Engineer 팀과의 HOT Line 구성
• 24*7 지원
MS 기술지원 서비스
• 프리미어 고객을 위한 전용 콜센터 운영 (연중무휴)
• 국내에서 문제 해결이 어려운 경우 본사로 Escalation.
• 심각한 긴급장애에 대비한 “Critsit” 프로세스 운영
• 심각도가 높은 (1/A) 중대상황에서의 협업지원
TAM,GTEC,본사 HQ
PDW Roadmap
Q1 Q2
• SQL Server 2012 Integration • Columnar Store Index • Stored procedures – Full support • Integrated Authentication • Higher Isolation levels • PowerView integration • Encryption of data • Workload management • Landing zone/Backup nodes redu
ndancy • Windows 8 • Hardware refresh
2012
• Native SQL Server drivers, JDBC • Various collations support • SCOM pack • Half Rack, Full Rack • T-SQL improvement
Q4
PDW Version 2 PDW Version 1
~ Appliance Update 3
Q3
• Microsoft BI tools integration(Analysis Services, Integration Services, SharePoint, MDM, Streaming Data)
• 3rd party integration (Informatica, Microstrategy, SAP Business Objects, SAS, HADOOP etc)
References
산업 고객 DW Size 납품 년도 적용 범위 제안된 솔루션
금융 미국 1위 장외 증권 거래소
450TB : 운영계 80TB : DR
2010 ~2011 대규모 거래 정보 DW 시스템 • DW : *PDW Full Rack
금융 미국 4위 증권 거래소
300TB (2TB 증가/월)
2011 다양한 데이터 원본으로부터 주문, 거래 그리고 트랜잭션 QTR 분석 시스템
• DW : PDW Full Rack • BI : SQL Integration Services, SQL
Server Analysis Services, SQL Server Reporting Services, PowerPivot
금융 미국 2위 은행 80TB 2011 Wealth management를 위해 규제, 이력 그리고 트랜드 요구 사항을 처리하기 위한 시스템
• DW : PDW Full Rack
금융 유럽 종합 금융회사
40TB 2011
“Single version of truth” 를 위한 EDW 통합 및 마트로의 고성능 데이터 배포를 통한 온라인 뱅킹 분석 시스템
• DW : PDW, Fast Track DW • ETL : SQL Server Integration Services
with Attunity, • BI : SQL Server Analysis Services, SQL
Server Reporting Services, PowerPivot, Panorama Necto, SharePoint, Windows HPC, Bing Maps and Office 2010
통신 대만 1위 통신 회사
30TB 2011 인터넷 서비스 부서의 캠페인, 빌링, 웹로그, 프로모션 그리고 제품을 분석하기 위한 시스템
• DW : PDW Full Rack
• BI : SQL Reporting Services
유통 유통회사 유통정보 분석 • DW : PDW Full Rack
제조 제조회사 300TB : 초기 사이즈 900TB : 향후 5년 예상
2010~2011 자사 프로세스 칩 디자인, 테스트 그리고 운영 데이터를 관리하기 위한 EDW 시스템
• DW : PDW Full Rack
금융 흥국화재 10TB: 3년 예상 2010.11~2011.09 흥국화재 정보계 (마케팅, 영업 부문적용)
• DW : MS FastTrack
제조 삼성전자 80TB 2011.01~현재 품질관리 DW • DW : MS FastTrack
제조 LS 산전 6TB 2011.04~현재 품질관리 DW • DW : MS FastTrack
* PDW Full Rack : PDW Appliance 모델 / ** FastTrack : MS SMP방식의 Reference Architecture 모델
Technical References
• SQL Server Parallel Data Warehouse – http://www.microsoft.com/sqlserver/en/us/solutions-technologies/data-warehousing/pdw.aspx
• HP Enterprise Data Warehouse Appliance – http://www.microsoft.com/sqlserver/en/us/solutions-technologies/Appliances/HP-pdw.aspx
– http://h10010.www1.hp.com/wwpc/pscmisc/vac/us/en/sm/solutions/enterprise-overview.html
• DELL Parallel Data Warehouse Appliance – http://www.microsoft.com/sqlserver/en/us/solutions-technologies/Appliances/Dell-pdw.aspx
• SQL Server PDW Wiki – http://social.technet.microsoft.com/wiki/hub/contents/sqlpdw/default.aspx
• SQLPDW – http://sqlpdw.com/