Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018

Amazon Web Services Korea
Amazon Web Services KoreaAmazon Web Services Korea
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
김민성
Solutions Architect / Amazon Web Services
Bigdata
Amazon Redshift
아키텍처 및 모범사례
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
“Hive 대비
50~100배 빠른 성능”
Amazon Redshift
빠른 성능 비용 효율적 데이터 레이크와의
통합
보안
$ Data lake
10011000010010101
11001010101110010
10110101100101
010100001
1/10 비용으로 빠르고, 손쉬운 확장을 지원하는 완전 관리형 DW
“210억 행과
100억행 조인에 2
시간”
“시간당 $0.25로
시작”
”년간 압축
데이터 기준 1TB에
$250~$333”
“모든 Activity에
대한 감사”
“저장부터 전송까지
전계층 암호화”
“S3 (데이터레이크) 대
한 쿼리”
”AWS 다양한 서비스
와의 유연한 통합”
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Amazon Redshift
데이터레이크와의 통합
Amazon S3
데이터 레이크
Redshift Spectrum
쿼리 엔진
• Amazon Redshift에서 S3데이터에 대한
쿼리
• 다양한 포멧 지원
(CSV, ORC, Gro, Avro, Parquet)
• 빠른 쿼리 성능
• Compute과 Storage 에 대한 별도의
용량 관리
• On demand, 쿼리당 스켄 데이터에
기준한 비용 (TB 당 $5)
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
만약 빅데이터 분석을 처음 시작하신다면…
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
아키텍처 및 업데이트
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Amazon Redshift 클러스터 아키텍처
• MPP 기반의 아키텍처
• Amazon S3로의 지속적엔 데이터 백업
• 리더 노드
• SQL 엔드포인트
• 메타데이터 저장소
• 병렬 SQL 쿼리 코디네이터
• 컴퓨팅 노드
• 로컬, 컬럼 기반의 스토리지
• 컴퓨팅 최적화 (DC), 스토리지 최적화 (DS)
• 데이터 로드, 백업 및 복원 주체
• 2, 16, 32개 슬라이스 (Virtual Core 당)
Redshift 클러스터
JDBC/ODBC 커넥션
리더 노드
컴퓻 노드
• 데이터 로딩
• 스트리밍 백업/복원
• 확장 스토리지
Amazon S3
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
새로운 고밀도 컴퓨팅 노드 – DC2
“Amazon Redshift DC1에서 DC2로 이전한
후 월간 레포트 작성이 9배가 빨라 졌습니다.”
- Bradley Todd,
Technical Architect, Liberty Mutual
NVMe SSD DDR4 Memory Intel E5-2686 v4 (Broadwell)
동일 가격에 DC1 대비 3배 높아진 I/O 성능과 30% 개선된 컴퓨팅 성능
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
분석 및 BI,
대쉬 보드 도구
Amazon Redshift
RESULTS CACHE
QUERY_ID RESULT
QUERY_ID RESULT
결과 캐싱 - 일초 미만의 쿼리 응답 속도
쿼리 실행 시간을 단축을 위한 쿼리 결과 메모리 케싱
• 기본 활성화 (관련 파라메터 enable_result_cache_for_session)
• 캐시 조건
• 쿼리에 사용되는 객체에 대한 액세스 권한 보유
• Redshift 쿼리 관련 파라메터 및 조회하는 테이블내
데이터의 미변경
• 쿼리 실행 시마다 실행해야 하는 함수 (예: GETDATE)
미사용
• 리더 노드 사이즈 및 쿼리 결과 크기를 기준으로 캐싱
• 세션에 관계 없이 캐쉬 조회
• SVL_QLOG 뷰의 “source_query”항목을 통해 확인
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
단기 쿼리 가속화 Short Query Acceleration (SQA)
Amazon Redshift
Machine Learning Class
ifier
머신 러닝분석 및 BI,
대쉬 보드 도구
• 머신 러닝 알고리즘을 기반으로 단기 쿼리 판단
• 장기 쿼리뒤에서 단기 쿼리가 대기하지 않도록 SQA
전용 큐에서 단기 쿼리 실행
• SQA 조건
• GUI에서는 WML의 총 슬롯 수가 15개 이하여야 함
(CLI, API를 통해 SQA를 활성화 한 경우 해당 없음)
• CTAS 및 읽기 전용 쿼리에 사용
• 기본값은 5초 (권장), 최대 20초까지 설정
• ‘STL_WLM_Query’의 ‘service_class’ 컬럼값이 14인
쿼리가 SQA를 통해 Acceleration된 쿼리 문이며,
‘final_state’를 통해 ‘Completed’ 또는 ‘Evicted’ 여부를
확인할 수 있음
장기 쿼리로 인한 체감 성능 저하 완화 및 동시성 확보
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
노드 선택의 기준
• DC 또는 DS
• IO Latency 요구 사항 및 필요 스토리지 용량
• 노드의 사이즈
• 쿼리의 수행 패턴 (Slice Level, Node Level)
• Slice Level vs Node Level
• Broadcast
• 결과 캐싱 사용 여부
• 리더 노드 전용 함수 및 최종 Sorting,
Aggregation (집계) 의 사용
• 최신 세대의 노드
리더 노드 전용 함수
날짜 함수
• AGE
• CURRENT_TIME
• CURRENT_TIMESTAMP
• LOCALTIME
• ISFINITE
• NOW
문자열 함수
• ASCII
• GET_BIT
• GET_BYTE
• SET_BIT
• SET_BYTE
• TO_ASCII
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
노드 타입 및 클러스터 사이즈 변경
1. 기존 클러스터를 Read Only 모드로 변경
2. 변경된 노드 수량 및 노드 타입에 맞춰 신규 클러스터 생성
3. 클러스터의 데이터를 신규 클러스터로 병렬 전송
4. 기존 클러스터의 SQL Endpoint 변경 (DNS 활용)
5. 기존 클러스터 제거
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
노드 타입 및 클러스터 사이즈 변경
1. 기존 클러스터를 Read Only 모드로 변경
2. 변경된 노드 수량 및 노드 타입에 맞춰 신규 클러스터 생성
3. 클러스터의 데이터를 신규 클러스터로 병렬 전송
4. 기존 클러스터의 SQL Endpoint 변경 (DNS 활용)
5. 기존 클러스터 제거
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
노드 타입 및 클러스터 사이즈 변경
1. 기존 클러스터를 Read Only 모드로 변경
2. 변경된 노드 수량 및 노드 타입에 맞춰 신규 클러스터 생성
3. 클러스터의 데이터를 신규 클러스터로 병렬 전송
4. 기존 클러스터의 SQL Endpoint 변경 (DNS 활용)
5. 기존 클러스터 제거
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
데이터 및 스키마 모델링
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Columnar 스토리지
ID Date Amount Handling Items State Payment
1 10/1/2013 $53.50 5 1 VA Visa
2 10/1/2013 $100.25 8 3 MD MC
3 10/2/2013 $25.50 3 1 VA Debit
4 10/2/2013 $150.75 6 10 NC Visa
5 10/2/2013 $99.90 3 4 PA ACH
6 10/3/2013 $75.85 7 7 MD Visa
주문 테이블 (Order Table)
“Select ID, Amount, State from Order”
“ROW 스토리지”
“Columnar 스토리지”
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Columnar 스토리지
“적절한 크기의 데이터형
선언을 통한 성능 향상”
• Redshift는 쿼리 수행 및 데이터 Ingestion시 선언된 Column의
크기를 기반으로 버퍼 준비
• 실 데이터 보다 큰 자료형은 메모리의 낭비를 가져올 수 있음
• SVV_TABLE_INFO 테이블의
‘max_varchar’을 통해 가장
큰 열을 확인
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
스키마 디자인
Star Snowflake
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
테이블 분산 스타일
분산 키 전체 (All)
Node 1
Slice 1 Slice 2
Node 2
Slice 3 Slice 4
Node 1
Slice 1 Slice 2
Node 2
Slice 3 Slice 4
모든 데이터를를
각 노드에 전부
동일 키는 동일한 위치에
Node 1
Slice 1 Slice 2
Node 2
Slice 3 Slice 4
균등
라운드 로빈
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
분산키에 따른 데이터 분산
Node 1
Slice 1 Slice 2
Node 2
Slice 3 Slice 4
user_profile
user_id=1234
name=janet
…
user_profile
user_id=6789
name=fred
…
cloudfront
uri = /imgs/ad1.png
user_id=2345
…
user_profile
user_id=2345
name=bill
…
cloudfront
uri=/games/g10.exe
user_id=4312
…
user_profile
user_id=4312
name=fred
…
order_line
order_line_id = 25693
…
“분산키는 레코드가 어느 슬라이스에 저장되게 될지를 결정함”
cloudfront
uri = /games/g1.exe
user_id=1234
…
cloudfront
uri = /img/ad_5.img
user_id=1234
…
테이블에서 동일 분산키를 갖
는 레코드는 동일 슬라이스
에 저장
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
분산키에 따른 데이터 분산
Node 1
Slice 1 Slice 2
cloudfront
uri = /games/g1.exe
user_id=1234
…
user_profile
user_id=1234
name=janet
…
cloudfront
uri = /imgs/ad1.png
user_id=2345
…
user_profile
user_id=2345
name=bill
…
order_line
order_line_id = 25693
…
cloudfront
uri = /img/ad_5.img
user_id=1234
…
다른 테이블의 레코드의
경우에도 동일한 분산키를
사용하는 경우
동일 슬라이스에 저장
Node 2
Slice 3 Slice 4
user_profile
user_id=6789
name=fred
…
cloudfront
uri=/games/g10.exe
user_id=4312
…
user_profile
user_id=4312
name=fred
…
테이블에서 동일 분산키를 갖
는 레코드는 동일 슬라이스
에 저장
“분산키를 통한 조인 연산에 대한 데이터 지역성 확보”
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
데이터 분산 여부의 판별
• 적절한 분산 처리
• Broadcast 발생
DS_DIST_NONE, DS_DIST_ALL_NONE
DS_BCAST_INNER, DS_DIST_BOTH
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
네트워크 Broadcast
DS_DIST* INFO
DS_DIST_NONE Preferred, no data transfer between nodes.
DS_DIST_ALL_NONE One table has DISTSTYLE ALL, no data transfer between nodes.
DS_DIST_ALL_INNER Inner table is being sent to the Single Node.
DS_DIST_INNER Inner table is being redistributed in an outer join.
DS_DIST_OUTER Outer table is being redistributed in an outer join.
DS_BCAST_INNER Inner table is being broadcast to all nodes.
DS_BCAST_BOTH Both tables are being broadcast to all nodes.
쿼리 수행에 있어 네트워크를 통한 데이터이동은 가장 비용이 비싼 오퍼레이션
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
데이터 분산과 분산 키
Node 1
Slice 1 Slice 2
Node 2
Slice 3 Slice 4
cloudfront
uri = /games/g1.exe
user_id=1234
…
cloudfront
uri = /imgs/ad1.png
user_id=2345
…
cloudfront
uri=/games/g10.exe
user_id=4312
…
cloudfront
uri = /img/ad_5.img
user_id=1234
…
2M records
5M records
1M records
4M records
적절치 못한 분산키 선택은 단일 슬라이스로의 데이터 쏠림 현상을 초래
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
데이터 분산과 분산 키
Node 1
Slice 1 Slice 2
Node 2
Slice 3 Slice 4
cloudfront
uri = /games/g1.exe
user_id=1234
…
cloudfront
uri = /imgs/ad1.png
user_id=2345
…
cloudfront
uri=/games/g10.exe
user_id=4312
…
cloudfront
uri = /img/ad_5.img
user_id=1234
…
2M records2M records 2M records 2M records
균등한 데이터 분산은 쿼리 성능 향상에 도움이 됨
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
적절한 분산키의 선택
• 목적
• 각 노드에 균등하게 데이터 분산
• 데이터의 이동 최소화 : Co-located Joins & Aggregates
• 분산키에 적절한 컬럼
• 가장 큰 테이블에서 조인에 활용되는 컬럼
• Group By 조건에서 사용되는 컬럼
• 높은 Cardinality를 보유한 컬럼
• 분산키에 적절치 않은 컬럼
• Where 조건절에서 활용되는 칼럼
• 데이터의 몰림을 유발하는 컬럼
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
팁! 분산키 어떻게 선택할까?
1. 가장 큰 Dimension Table의 Primary키와 Fact Table의 Foreign키
를 Dist Key로 선택
2. 나머지 조인이 되는 조건의 Dimension Table은 Distribution ALL
을 검토 한다.
“300만개 이하의 경우 데이터 분산 타입을 전체 (ALL)로 선택해도 무방"
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
팁! 분산키 어떻게 선택할까?
1. 가장 자주 활용되는 쿼리를 확인합니다.
예 “awslabs/amazon-redshift-utils/AdminScripts/top-queries.sql” 활용 등
2. 조인 또는 Group By에 활용되며 고른 데이터 분포 및 높은 Cardinality 보유한 컬럼
을 선택 합니다.
3. 그게 아니라면….
“Fact Table은 Even으로 Dimension Table은 ALL로”
“참고 : MPP 형태의 스키마는 테이블 내에
모든 데이터를 보유하기 때문에 Distribution style 은 Even으로“
“3정규화 형태의 Inmon 모델은 노드 수량은 줄이고
노드 크기는 키우거나 Star Schema로 전환"
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
데이터 정렬
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
성능 향상
1. 보다 높은 하드웨어 스펙
2. 병렬화의 달성
3. 네트워크를 통한 트레픽의 최소화
“스토리지 I/O의 최소화”
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SELECT COUNT(*)
FROM LOGS
WHERE DT = ‘09-JUNE-2015’
• Zone Map : 각 Block에 대한 최대값 및 최소값에 대한 정보 저장
Zone Map과 정렬
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
정렬 키
• 정렬 키가 지정된 테이블의 경우 데이터 로드시 정렬 순서대로 디스크에
저장
• 정렬키의 종류
• 정렬 키: 테이블의 단일 컬럼의 값을 기준으로 데이터를 정렬하여 저장
• 복합 정렬키 (Compound Sort Key):
• 다수의 컬럼을 활용 (최대 6개) 활용하여 정렬 키로 활용
• 선언한 순서에 따라 순차적으로 정렬되어 저장됨
• 조인 및 Group By, Order By에 효과적이며, 특히 사전에 순서대로 정렬이 되어 있기 때문에 Merge 조인에
효과적
• 인터리브 정렬키 (Interleaved Sort Key)
• 다수의 컬럼을 활용 (최대 8개) 활용하여 정렬 키로 활용
• 정렬 키에서 각 열, 즉 열의 하위 집합에 똑같은 가중치를 부여
• AD-Hoc 형태의 쿼리에서 높은 성능을 제공함
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
복합 정렬 키 vs 인터리브 정렬 키
• 키 선언 : Product (type, color, size)
• 복합 정렬키 type, color, size
• Where type = ‘shirt’ and color=‘red’ and size = ‘xl’: 정렬을 기반한
가장 우수한 성능
• Where type = ‘shirt’ and color=‘red’: 약간 효과적
• Where type = ‘shirt’ and size = ‘xl’: 제한적으로 성능에 기여함
• 인터리브 정렬키 type, color, size
• 조회시 type, color, size 순서등에 관계 없이 일관성 있는 성능 제공
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
그리고…
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
쿼리 분석
EXPLAIN 커맨드와 실제 쿼리 수행:
EXPLAIN은 쿼리 수행과 관련된 정보
• 수행된 오퍼레이션 및 그에 대한 비용
• 쿼리에 사용된 테이블 및 컬럼 정보
• 프로세싱에 사용될 데이터의 크기
참고 : https://docs.aws.amazon.com/redshift/latest/dg/c-the-query-plan.html
explain select avg(datediff(day, listtime, saletime)) as avgwait from sales,
listing where sales.listid = listing.listid;
QUERY PLAN
XN Aggregate (cost=6350.30..6350.31 rows=1 width=16)
-> XN Hash Join DS_DIST_NONE (cost=47.08..6340.89 rows=3766 width=16)
Hash Cond: ("outer".listid = "inner".listid)
-> XN Seq Scan on listing (cost=0.00..1924.97 rows=192497 width=12)
-> XN Hash (cost=37.66..37.66 rows=3766 width=12)
-> XN Seq Scan on sales (cost=0.00..37.66 rows=3766 width=12)
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
파일 분산 및 병렬 로딩
client.aa
client.ab
client.ac
client.ad
Node 0
Slice 0
Slice 1
Node1
Slice 0
Slice 1
{
"entries": [
{"url":"s3://mybucket-alpha/client.aa", "mandatory":true},
{"url":"s3://mybucket-alpha/client.ab", "mandatory":true},
{"url":"s3://mybucket-beta/client.ac", "mandatory":true},
{"url":"s3://mybucket-beta/client.ad", "mandatory":true}
]
}
매니페스트 파일
copy customer
from 's3://mybucket/cust.manifest'
iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole'
manifest;
Copy 커멘트를 통한 실행
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
압축
analyze compression listing;
Table | Column | Encoding
---------+----------------+----------
listing | listid | delta
listing | sellerid | delta32k
listing | eventid | delta32k
listing | dateid | bytedict
listing | numtickets | bytedict
listing | priceperticket | delta32k
listing | totalprice | mostly32
listing | listtime | raw
ID Age State Amount
123 20 CA 500
345 25 WA 250
678 40 FL 125
957 37 WA 375
• 압축을 기반으로 디스크 사용량 및
I/O 더욱 줄일 수 있습니다.
• COPY 커멘트 사용시 10만 행을
우선 적제 후 압축 옵션 평가
(COMPUDATE on)
• “ANALYZE COMPRESSION” 커멘트
를 통해 현재 압축 (인코딩)에 대한
평가 후 “ALTER TABLE”로 변경
2x ~ 4x
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
기타
• Vacuum
• 변경되거나 삭제된 블럭에 대한 정리
• 정렬키에 맞춰 데이터 정렬
• 옵션 : FULL, SORT ONLY, DELETE ONLY, REINDEX (인터리브 정렬키)
• 통계 업데이트
• 통계 업데이트 자동 실행
• CREATE (TEMP) TABLE AS SELECT
• SELECT INTO
• COPY (with COMPUPDATE ON)
• 통계 업데이트를 실행해줘야 하는 경우
• 기존 데이터의 5%이상에 대해 변경이 있는 경우
• 외례키를 추가하거나 삭제한 경우
• Vacuum 실행 후
• 제약 조건 (not null, primary, foreign, unique)은 쿼리 옵티마이저가 활용
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
S3 데이터레이크와 통합
Amazon Redshift Spectrum
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Redshift Spectrum
S3의 수천개 이상의 노드들을 활용하여 쿼리 실행
Fast @ exabyte scale Elastic & highly available On-demand, pay-per-query
High concurrency: Multiple clusters
access same data
No ETL: Query data in-place using open
file formats
Full Amazon Redshift
SQL support
S3
SQL
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
데모 아키텍처
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SELECT
c.c_name,
c.c_mktsegment,
t.prettyMonthYear,
SUM(uv.adRevenue)
FROM
clickstream.uservisits_csv10 as uv
RIGHT OUTER JOIN
customer as c
ON c.c_custkey = uv.custKey
INNER JOIN
(
SELECT
DISTINCT d_yearmonthnum,
(d_month||','||d_year) as prettyMonthYear
FROM
dwdate
WHERE
d_yearmonthnum >= 199810
) as t
ON uv.yearMonthKey = t.d_yearmonthnum
WHERE
c.c_custkey <= 3
GROUP BY
c.c_name,
c.c_mktsegment,
t.prettyMonthYear,
uv.yearMonthKey
ORDER BY
c.c_name,
c.c_mktsegment,
uv.yearMonthKey ASC
XN Merge (cost=1141056800867.31..1141056801917.31 rows=420000 width=78)
-> XN Network (cost=1141056800867.31..1141056801917.31 rows=420000 width=78)
-> XN Sort (cost=1141056800867.31..1141056801917.31 rows=420000 width=78)
-> XN HashAggregate (cost=141056760589.25..141056761639.25 rows=420000 width=78)
-> XN Hash Join DS_DIST_ALL_NONE (cost=37.34..141056596142.86 rows=13155711 width=78)
-> XN Hash Join DS_DIST_ALL_NONE (cost=4.50..141051766084.98 rows=375877435 width=46)
-> XN Hash (cost=3.75..3.75 rows=300 width=38)
-> XN Seq Scan on customer c (cost=0.00..3.75 rows=300 width=38)
-> XN Hash (cost=32.82..32.82 rows=7 width=36)
-> XN Subquery Scan t (cost=0.00..32.82 rows=7 width=36)
-> XN Unique (cost=0.00..32.75 rows=7 width=18)
-> XN Seq Scan on dwdate (cost=0.00..32.43 rows=64 width=18)
-> XN Seq Scan PartitionInfo of clickstream.uservisits_csv10 uv (cost=0.00..10.00 rows=1000 width=0)
-> XN S3 Query Scan uv (cost=0.00..93969358.62 rows=3758774345 width=16)
clickstream.uservisits_csv10 as uv
rows=3758774345
• 결과 : 약 4분 47초
• CSV 포멧
• 파티셔닝 없음
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SELECT
c.c_name,
c.c_mktsegment,
t.prettyMonthYear,
SUM(uv.adRevenue)
FROM
clickstream.uservisits_parquet1 as uv
RIGHT OUTER JOIN
customer as c
ON c.c_custkey = uv.custKey
INNER JOIN
(
SELECT
DISTINCT d_yearmonthnum,
(d_month||','||d_year) as prettyMonthYear
FROM
dwdate
WHERE
d_yearmonthnum >= 199810
) as t
ON uv.yearMonthKey = t.d_yearmonthnum
WHERE
c.c_custkey <= 3
GROUP BY
c.c_name,
c.c_mktsegment,
t.prettyMonthYear,
uv.yearMonthKey
ORDER BY
c.c_name,
c.c_mktsegment,
uv.yearMonthKey ASC
XN Merge (cost=1141056800867.31..1141056801917.31 rows=420000 width=78)
-> XN Network (cost=1141056800867.31..1141056801917.31 rows=420000 width=78)
-> XN Sort (cost=1141056800867.31..1141056801917.31 rows=420000 width=78)
-> XN HashAggregate (cost=141056760589.25..141056761639.25 rows=420000 width=78)
-> XN Hash Join DS_DIST_ALL_NONE (cost=37.34..141056596142.86 rows=13155711 width=78)
-> XN Hash Join DS_DIST_ALL_NONE (cost=4.50..141051766084.98 rows=375877435 width=46)
-> XN Hash (cost=3.75..3.75 rows=300 width=38)
-> XN Seq Scan on customer c (cost=0.00..3.75 rows=300 width=38)
-> XN Hash (cost=32.82..32.82 rows=7 width=36)
-> XN Subquery Scan t (cost=0.00..32.82 rows=7 width=36)
-> XN Unique (cost=0.00..32.75 rows=7 width=18)
-> XN Seq Scan on dwdate (cost=0.00..32.43 rows=64 width=18)
-> XN Seq Scan PartitionInfo of clickstream.uservisits_parquet1 uv (cost=0.00..10.00 rows=1000 width=0)
-> XN S3 Query Scan uv (cost=0.00..93969358.62 rows=3758774345 width=16)
clickstream.uservisits_parquet1 as uv
rows=3758774345
• 결과 : 약 26초
• Parquet 포멧 (Columnar 포멧)
• 파티셔닝 없음
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SELECT
c.c_name,
c.c_mktsegment,
t.prettyMonthYear,
uv.totalRevenue
FROM
((SELECT
customer,
visitYearMonth,
SUM(adRevenue) as totalRevenue
FROM
clickstream.uservisits_parquet1
WHERE
customer <= 3
and visitYearMonth >= 199810
GROUP BY
customer,
visitYearMonth) as uv
RIGHT OUTER JOIN
customer as c
ON c.c_custkey = uv.customer
INNER JOIN
(
SELECT
DISTINCT d_yearmonthnum,
(d_month||','||d_year) as prettyMonthYear
FROM
dwdate
WHERE
d_yearmonthnum >= 199810
) as t
ON uv.visitYearMonth = t.d_yearmonthnum
)
ORDER BY
c.c_name,
c.c_mktsegment,
uv.visitYearMonth ASC
XN Merge (cost=1000094008880.16..1000094008880.18 rows=7 width=78)
-> XN Network (cost=1000094008880.16..1000094008880.18 rows=7 width=78)
-> XN Sort (cost=1000094008880.16..1000094008880.18 rows=7 width=78)
-> XN Hash Join DS_DIST_ALL_NONE (cost=94008878.97..94008880.06 rows=7 width=78)
-> XN Hash Join DS_DIST_ALL_NONE (cost=93971378.97..93971379.61 rows=7 width=48)
-> XN Subquery Scan uv (cost=93971346.13..93971346.42 rows=23 width=16)
-> XN HashAggregate (cost=93971346.13..93971346.19 rows=23 width=16)
-> XN Hash (cost=32.82..32.82 rows=7 width=36)
-> XN Subquery Scan t (cost=0.00..32.82 rows=7 width=36)
-> XN Unique (cost=0.00..32.75 rows=7 width=18)
-> XN Seq Scan on dwdate (cost=0.00..32.43 rows=64 width=18)
-> XN Hash (cost=30000.00..30000.00 rows=3000000 width=38)
-> XN Seq Scan on customer c (cost=0.00..30000.00 rows=3000000 width=38)
-> XN Seq Scan PartitionInfo of clickstream.uservisits_parquet1 (cost=0.00..17.50 rows=112 width=8)
-> XN S3 Query Scan uservisits_parquet1 (cost=46984679.32..46984689.32 rows=1000 width=8)
customer <= 3
and visitYearMonth >= 199810
rows=3000000
• 결과 : 약 3초
• Parquet 포멧 (Columnar 포멧)
• 파티셔닝 : customer, visitYearMonth
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
EMR을 활용한 ORC, Parquet 형태로 데이터 변경
하이브 쿼리 (CREATE TABLE AS SELECT)를 통해 변경
CREATE TABLE data_converted
STORED AS PARQUET
AS
SELECT col_1, col2, col3 FROM data_source
Spark Script 활용
사례 : ELB 1TB 로그 변환
- 1TB의 ROW기반 데이터를 Parquet 변환시 130GB까지 축소 (압축 코덱 Snappy)
- EMR 비용 : 5$
참고 : https://github.com/awslabs/aws-big-data-blog/tree/master/aws-blog-spark-parquet-conversion
AWS Glue 활용
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Redshift Spectrum Best Practice
• 파티셔닝 및 Columnar 파일 포맷 (ORC, Parquet) 사용
• 파티셔닝 컬럼의 조건
• 필터 및 조인의 조건이 되는 컬럼
• 비니지스 유닛
• 비니지스 그룹
• 날짜 및 시간
• 파일의 갯수는 Redshift의 Slice의 수량 이상
• 파일의 크기는 64MB 이상을 권고
• 각 파일은 동일한 크기를 권고
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
마무리 하며,
• Redshift 도구 모음:
https://github.com/awslabs/amazon-redshift-utils
• Redshift 커스톰 모니터링 도구:
https://github.com/awslabs/amazon-redshift-monitoring
• Amazon Redshift Column Encoding Utility:
https://github.com/awslabs/amazon-redshift-utils/tree/master/src/ColumnEncodingUtility
• Analyze & Vacuum Schema Utility:
https://github.com/awslabs/amazon-redshift-utils/tree/master/src/AnalyzeVacuumUtility
• 마이크로 배치 로딩:
https://aws.amazon.com/blogs/big-data/best-practices-for-micro-batch-loading-on-
amazon-redshift/
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
오늘 마무리 못한 이야기들은…
“Go Builder Theater“
Day 2 오후 3시 20분 ~ 3시 50분
Redshift 못다한 이야기
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
AWS Summit 모바일 앱과 QR코드를 통
해 강연 평가 및 설문 조사에 참여해 주
시기 바랍니다.
내년 Summit을 만들 여러분의 소중한 의
견 부탁 드립니다.
#AWSSummit 해시태그로 소셜 미디어에 여러분의 행사 소
감을 올려주세요.
발표 자료 및 녹화 동영상은 AWS Korea 공식 소셜 채널로
공유될 예정입니다.
여러분의 피드백을 기다립니다!
감사합니다
1 de 50

Recomendados

Amazon Redshift의 이해와 활용 (김용우) - AWS DB Day por
Amazon Redshift의 이해와 활용 (김용우) - AWS DB DayAmazon Redshift의 이해와 활용 (김용우) - AWS DB Day
Amazon Redshift의 이해와 활용 (김용우) - AWS DB DayAmazon Web Services Korea
26.8K visualizações94 slides
실시간 스트리밍 분석 Kinesis Data Analytics Deep Dive por
실시간 스트리밍 분석  Kinesis Data Analytics Deep Dive실시간 스트리밍 분석  Kinesis Data Analytics Deep Dive
실시간 스트리밍 분석 Kinesis Data Analytics Deep DiveAmazon Web Services Korea
731 visualizações44 slides
글로벌 기업들의 효과적인 데이터 분석을 위한 Data Lake 구축 및 분석 사례 - 김준형 (AWS 솔루션즈 아키텍트) por
글로벌 기업들의 효과적인 데이터 분석을 위한 Data Lake 구축 및 분석 사례 - 김준형 (AWS 솔루션즈 아키텍트)글로벌 기업들의 효과적인 데이터 분석을 위한 Data Lake 구축 및 분석 사례 - 김준형 (AWS 솔루션즈 아키텍트)
글로벌 기업들의 효과적인 데이터 분석을 위한 Data Lake 구축 및 분석 사례 - 김준형 (AWS 솔루션즈 아키텍트)Amazon Web Services Korea
7K visualizações50 slides
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인 por
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인Amazon Web Services Korea
1.6K visualizações33 slides
효율적인 빅데이터 분석 및 처리를 위한 Glue, EMR 활용 - 김태현 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019 por
효율적인 빅데이터 분석 및 처리를 위한 Glue, EMR 활용 - 김태현 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019효율적인 빅데이터 분석 및 처리를 위한 Glue, EMR 활용 - 김태현 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
효율적인 빅데이터 분석 및 처리를 위한 Glue, EMR 활용 - 김태현 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019Amazon Web Services Korea
3.6K visualizações60 slides
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017 por
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017Amazon Web Services Korea
3.3K visualizações64 slides

Mais conteúdo relacionado

Mais procurados

Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나 por
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나Amazon Web Services Korea
967 visualizações17 slides
Aws glue를 통한 손쉬운 데이터 전처리 작업하기 por
Aws glue를 통한 손쉬운 데이터 전처리 작업하기Aws glue를 통한 손쉬운 데이터 전처리 작업하기
Aws glue를 통한 손쉬운 데이터 전처리 작업하기Amazon Web Services Korea
11.8K visualizações43 slides
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안 por
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안Amazon Web Services Korea
298 visualizações65 slides
Amazon Redshift로 데이터웨어하우스(DW) 구축하기 por
Amazon Redshift로 데이터웨어하우스(DW) 구축하기Amazon Redshift로 데이터웨어하우스(DW) 구축하기
Amazon Redshift로 데이터웨어하우스(DW) 구축하기Amazon Web Services Korea
7.7K visualizações36 slides
모든 데이터를 위한 단 하나의 저장소, Amazon S3 기반 데이터 레이크::정세웅::AWS Summit Seoul 2018 por
모든 데이터를 위한 단 하나의 저장소, Amazon S3 기반 데이터 레이크::정세웅::AWS Summit Seoul 2018모든 데이터를 위한 단 하나의 저장소, Amazon S3 기반 데이터 레이크::정세웅::AWS Summit Seoul 2018
모든 데이터를 위한 단 하나의 저장소, Amazon S3 기반 데이터 레이크::정세웅::AWS Summit Seoul 2018Amazon Web Services Korea
4.1K visualizações49 slides
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법 por
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법Amazon Web Services Korea
221 visualizações32 slides

Mais procurados(20)

Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나 por Amazon Web Services Korea
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
Amazon Web Services Korea967 visualizações
Aws glue를 통한 손쉬운 데이터 전처리 작업하기 por Amazon Web Services Korea
Aws glue를 통한 손쉬운 데이터 전처리 작업하기Aws glue를 통한 손쉬운 데이터 전처리 작업하기
Aws glue를 통한 손쉬운 데이터 전처리 작업하기
Amazon Web Services Korea11.8K visualizações
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안 por Amazon Web Services Korea
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안
워크로드 특성에 따른 안전하고 효율적인 Data Lake 운영 방안
Amazon Web Services Korea298 visualizações
Amazon Redshift로 데이터웨어하우스(DW) 구축하기 por Amazon Web Services Korea
Amazon Redshift로 데이터웨어하우스(DW) 구축하기Amazon Redshift로 데이터웨어하우스(DW) 구축하기
Amazon Redshift로 데이터웨어하우스(DW) 구축하기
Amazon Web Services Korea7.7K visualizações
모든 데이터를 위한 단 하나의 저장소, Amazon S3 기반 데이터 레이크::정세웅::AWS Summit Seoul 2018 por Amazon Web Services Korea
모든 데이터를 위한 단 하나의 저장소, Amazon S3 기반 데이터 레이크::정세웅::AWS Summit Seoul 2018모든 데이터를 위한 단 하나의 저장소, Amazon S3 기반 데이터 레이크::정세웅::AWS Summit Seoul 2018
모든 데이터를 위한 단 하나의 저장소, Amazon S3 기반 데이터 레이크::정세웅::AWS Summit Seoul 2018
Amazon Web Services Korea4.1K visualizações
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법 por Amazon Web Services Korea
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법
Amazon Web Services Korea221 visualizações
Amazon EMR과 SageMaker를 이용하여 데이터를 준비하고 머신러닝 모델 개발 하기 por Amazon Web Services Korea
Amazon EMR과 SageMaker를 이용하여 데이터를 준비하고 머신러닝 모델 개발 하기Amazon EMR과 SageMaker를 이용하여 데이터를 준비하고 머신러닝 모델 개발 하기
Amazon EMR과 SageMaker를 이용하여 데이터를 준비하고 머신러닝 모델 개발 하기
Amazon Web Services Korea781 visualizações
농심 그룹 메가마트 : 온프레미스 Exadata의 AWS 클라우드 환경 전환 사례 공유-김동현, NDS Cloud Innovation Ce... por Amazon Web Services Korea
농심 그룹 메가마트 : 온프레미스 Exadata의 AWS 클라우드 환경 전환 사례 공유-김동현, NDS Cloud Innovation Ce...농심 그룹 메가마트 : 온프레미스 Exadata의 AWS 클라우드 환경 전환 사례 공유-김동현, NDS Cloud Innovation Ce...
농심 그룹 메가마트 : 온프레미스 Exadata의 AWS 클라우드 환경 전환 사례 공유-김동현, NDS Cloud Innovation Ce...
Amazon Web Services Korea244 visualizações
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance... por Amazon Web Services Korea
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon Web Services Korea181 visualizações
데이터베이스 운영, 서버리스로 걱정 끝! - 윤석찬, AWS 테크에반젤리스트 - AWS Builders Online Series por Amazon Web Services Korea
데이터베이스 운영, 서버리스로 걱정 끝! - 윤석찬, AWS 테크에반젤리스트 - AWS Builders Online Series데이터베이스 운영, 서버리스로 걱정 끝! - 윤석찬, AWS 테크에반젤리스트 - AWS Builders Online Series
데이터베이스 운영, 서버리스로 걱정 끝! - 윤석찬, AWS 테크에반젤리스트 - AWS Builders Online Series
Amazon Web Services Korea6K visualizações
대규모 온프레미스 하둡 마이그레이션을 위한 실행 전략과 최적화 방안 소개-유철민, AWS Data Architect / 박성열,AWS Pr... por Amazon Web Services Korea
대규모 온프레미스 하둡 마이그레이션을 위한 실행 전략과 최적화 방안 소개-유철민, AWS Data Architect / 박성열,AWS Pr...대규모 온프레미스 하둡 마이그레이션을 위한 실행 전략과 최적화 방안 소개-유철민, AWS Data Architect / 박성열,AWS Pr...
대규모 온프레미스 하둡 마이그레이션을 위한 실행 전략과 최적화 방안 소개-유철민, AWS Data Architect / 박성열,AWS Pr...
Amazon Web Services Korea239 visualizações
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ... por Amazon Web Services
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Web Services14.4K visualizações
AWS Summit Seoul 2023 | 데이터, 분석 및 AI를 통합하는 단 하나의 레이크하우스, Databricks on AWS 로 ... por Amazon Web Services Korea
AWS Summit Seoul 2023 | 데이터, 분석 및 AI를 통합하는 단 하나의 레이크하우스, Databricks on AWS 로 ...AWS Summit Seoul 2023 | 데이터, 분석 및 AI를 통합하는 단 하나의 레이크하우스, Databricks on AWS 로 ...
AWS Summit Seoul 2023 | 데이터, 분석 및 AI를 통합하는 단 하나의 레이크하우스, Databricks on AWS 로 ...
Amazon Web Services Korea164 visualizações
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci... por Amazon Web Services Korea
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea473 visualizações
AWS Lake Formation을 통한 손쉬운 데이터 레이크 구성 및 관리 - 윤석찬 :: AWS Unboxing 온라인 세미나 por Amazon Web Services Korea
AWS Lake Formation을 통한 손쉬운 데이터 레이크 구성 및 관리 - 윤석찬 :: AWS Unboxing 온라인 세미나AWS Lake Formation을 통한 손쉬운 데이터 레이크 구성 및 관리 - 윤석찬 :: AWS Unboxing 온라인 세미나
AWS Lake Formation을 통한 손쉬운 데이터 레이크 구성 및 관리 - 윤석찬 :: AWS Unboxing 온라인 세미나
Amazon Web Services Korea3.6K visualizações
데이터 분석가를 위한 신규 분석 서비스 - 김기영, AWS 분석 솔루션즈 아키텍트 / 변규현, 당근마켓 소프트웨어 엔지니어 :: AWS r... por Amazon Web Services Korea
데이터 분석가를 위한 신규 분석 서비스 - 김기영, AWS 분석 솔루션즈 아키텍트 / 변규현, 당근마켓 소프트웨어 엔지니어 :: AWS r...데이터 분석가를 위한 신규 분석 서비스 - 김기영, AWS 분석 솔루션즈 아키텍트 / 변규현, 당근마켓 소프트웨어 엔지니어 :: AWS r...
데이터 분석가를 위한 신규 분석 서비스 - 김기영, AWS 분석 솔루션즈 아키텍트 / 변규현, 당근마켓 소프트웨어 엔지니어 :: AWS r...
Amazon Web Services Korea899 visualizações
Amazon S3 고급 활용 기법 - AWS Summit Seoul 2017 por Amazon Web Services Korea
Amazon S3 고급 활용 기법  - AWS Summit Seoul 2017Amazon S3 고급 활용 기법  - AWS Summit Seoul 2017
Amazon S3 고급 활용 기법 - AWS Summit Seoul 2017
Amazon Web Services Korea3.1K visualizações
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature... por Amazon Web Services Korea
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Web Services Korea149 visualizações
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20... por Amazon Web Services
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...
Amazon Web Services6.7K visualizações
Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017 por Amazon Web Services Korea
Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017
Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017
Amazon Web Services Korea3K visualizações

Similar a Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018

AWS에서 빅데이터 프로젝트 시작하기 - 이종화 솔루션즈 아키텍트, AWS por
AWS에서 빅데이터 프로젝트 시작하기 - 이종화 솔루션즈 아키텍트, AWSAWS에서 빅데이터 프로젝트 시작하기 - 이종화 솔루션즈 아키텍트, AWS
AWS에서 빅데이터 프로젝트 시작하기 - 이종화 솔루션즈 아키텍트, AWSAmazon Web Services Korea
2.7K visualizações53 slides
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS por
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWSAmazon Web Services Korea
7.8K visualizações43 slides
Amazon Neptune- 신규 그래프 데이터베이스 서비스 활용::김상필, 강정희::AWS Summit Seoul 2018 por
Amazon Neptune- 신규 그래프 데이터베이스 서비스 활용::김상필, 강정희::AWS Summit Seoul 2018 Amazon Neptune- 신규 그래프 데이터베이스 서비스 활용::김상필, 강정희::AWS Summit Seoul 2018
Amazon Neptune- 신규 그래프 데이터베이스 서비스 활용::김상필, 강정희::AWS Summit Seoul 2018 Amazon Web Services Korea
4.5K visualizações39 slides
게임을 위한 최적의 AWS DB 서비스 선정 퀘스트 깨기::최유정::AWS Summit Seoul 2018 por
게임을 위한 최적의 AWS DB 서비스 선정 퀘스트 깨기::최유정::AWS Summit Seoul 2018 게임을 위한 최적의 AWS DB 서비스 선정 퀘스트 깨기::최유정::AWS Summit Seoul 2018
게임을 위한 최적의 AWS DB 서비스 선정 퀘스트 깨기::최유정::AWS Summit Seoul 2018 Amazon Web Services Korea
4K visualizações42 slides
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ... por
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...Amazon Web Services Korea
7.4K visualizações69 slides
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018 por
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018Amazon Web Services Korea
4.3K visualizações52 slides

Similar a Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018(20)

AWS에서 빅데이터 프로젝트 시작하기 - 이종화 솔루션즈 아키텍트, AWS por Amazon Web Services Korea
AWS에서 빅데이터 프로젝트 시작하기 - 이종화 솔루션즈 아키텍트, AWSAWS에서 빅데이터 프로젝트 시작하기 - 이종화 솔루션즈 아키텍트, AWS
AWS에서 빅데이터 프로젝트 시작하기 - 이종화 솔루션즈 아키텍트, AWS
Amazon Web Services Korea2.7K visualizações
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS por Amazon Web Services Korea
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS
민첩하고 비용효율적인 Data Lake 구축 - 문종민 솔루션즈 아키텍트, AWS
Amazon Web Services Korea7.8K visualizações
Amazon Neptune- 신규 그래프 데이터베이스 서비스 활용::김상필, 강정희::AWS Summit Seoul 2018 por Amazon Web Services Korea
Amazon Neptune- 신규 그래프 데이터베이스 서비스 활용::김상필, 강정희::AWS Summit Seoul 2018 Amazon Neptune- 신규 그래프 데이터베이스 서비스 활용::김상필, 강정희::AWS Summit Seoul 2018
Amazon Neptune- 신규 그래프 데이터베이스 서비스 활용::김상필, 강정희::AWS Summit Seoul 2018
Amazon Web Services Korea4.5K visualizações
게임을 위한 최적의 AWS DB 서비스 선정 퀘스트 깨기::최유정::AWS Summit Seoul 2018 por Amazon Web Services Korea
게임을 위한 최적의 AWS DB 서비스 선정 퀘스트 깨기::최유정::AWS Summit Seoul 2018 게임을 위한 최적의 AWS DB 서비스 선정 퀘스트 깨기::최유정::AWS Summit Seoul 2018
게임을 위한 최적의 AWS DB 서비스 선정 퀘스트 깨기::최유정::AWS Summit Seoul 2018
Amazon Web Services Korea4K visualizações
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ... por Amazon Web Services Korea
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...
Amazon Web Services Korea7.4K visualizações
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018 por Amazon Web Services Korea
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018
실전! AWS 기반 데이터베이스 마이그레이션::최홍식::AWS Summit Seoul 2018
Amazon Web Services Korea4.3K visualizações
AWS를 활용한 게임 데이터 분석 퀘스트 깨기::안효빈::AWS Summit Seoul 2018 por Amazon Web Services Korea
AWS를 활용한 게임 데이터 분석 퀘스트 깨기::안효빈::AWS Summit Seoul 2018AWS를 활용한 게임 데이터 분석 퀘스트 깨기::안효빈::AWS Summit Seoul 2018
AWS를 활용한 게임 데이터 분석 퀘스트 깨기::안효빈::AWS Summit Seoul 2018
Amazon Web Services Korea2.1K visualizações
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018 por Amazon Web Services Korea
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
Amazon Web Services Korea604 visualizações
Amazon S3 최신 업데이트 및 고급 활용 기법:: 박성훈:: AWS Summit Seoul 2018 por Amazon Web Services Korea
Amazon S3  최신 업데이트 및 고급 활용 기법:: 박성훈:: AWS Summit Seoul 2018 Amazon S3  최신 업데이트 및 고급 활용 기법:: 박성훈:: AWS Summit Seoul 2018
Amazon S3 최신 업데이트 및 고급 활용 기법:: 박성훈:: AWS Summit Seoul 2018
Amazon Web Services Korea3.9K visualizações
[Retail & CPG Day 2019] Amazon.com의 무중단, 대용량 DB패턴과 국내사례 (Lotte e-commerce) - ... por Amazon Web Services Korea
[Retail & CPG Day 2019] Amazon.com의 무중단, 대용량 DB패턴과 국내사례 (Lotte e-commerce) - ...[Retail & CPG Day 2019] Amazon.com의 무중단, 대용량 DB패턴과 국내사례 (Lotte e-commerce) - ...
[Retail & CPG Day 2019] Amazon.com의 무중단, 대용량 DB패턴과 국내사례 (Lotte e-commerce) - ...
Amazon Web Services Korea2.9K visualizações
강의 4. 데이터베이스:: AWSome Day Online Conference por Amazon Web Services Korea
강의 4. 데이터베이스:: AWSome Day Online Conference강의 4. 데이터베이스:: AWSome Day Online Conference
강의 4. 데이터베이스:: AWSome Day Online Conference
Amazon Web Services Korea758 visualizações
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018 por Amazon Web Services Korea
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
Amazon Web Services Korea3.7K visualizações
Object storage의 이해와 활용 por Seoro Kim
Object storage의 이해와 활용Object storage의 이해와 활용
Object storage의 이해와 활용
Seoro Kim415 visualizações
빠르고 안전하게 간편한 AWS로 데이터 마이그레이션 하기::최유정 (AWS 솔루션즈아키텍트) por Amazon Web Services Korea
빠르고 안전하게 간편한 AWS로 데이터 마이그레이션 하기::최유정 (AWS 솔루션즈아키텍트)빠르고 안전하게 간편한 AWS로 데이터 마이그레이션 하기::최유정 (AWS 솔루션즈아키텍트)
빠르고 안전하게 간편한 AWS로 데이터 마이그레이션 하기::최유정 (AWS 솔루션즈아키텍트)
Amazon Web Services Korea3.8K visualizações
AWS를 통한 빅데이터 기반 비지니스 인텔리전스 구축- AWS Summit Seoul 2017 por Amazon Web Services Korea
AWS를 통한 빅데이터 기반 비지니스 인텔리전스 구축- AWS Summit Seoul 2017AWS를 통한 빅데이터 기반 비지니스 인텔리전스 구축- AWS Summit Seoul 2017
AWS를 통한 빅데이터 기반 비지니스 인텔리전스 구축- AWS Summit Seoul 2017
Amazon Web Services Korea2K visualizações
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018 por Amazon Web Services Korea
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
Amazon Web Services Korea3.2K visualizações
성공적인 디지털 혁신을 위한 AWS 데이터베이스 서비스 선택:: 구태훈::AWS Summit Seoul 2018 por Amazon Web Services Korea
성공적인 디지털 혁신을 위한 AWS 데이터베이스 서비스 선택:: 구태훈::AWS Summit Seoul 2018 성공적인 디지털 혁신을 위한 AWS 데이터베이스 서비스 선택:: 구태훈::AWS Summit Seoul 2018
성공적인 디지털 혁신을 위한 AWS 데이터베이스 서비스 선택:: 구태훈::AWS Summit Seoul 2018
Amazon Web Services Korea2.3K visualizações
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ... por Amazon Web Services Korea
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon Web Services Korea304 visualizações
Azure Databases for PostgreSQL MYSQL and MariaDB por rockplace
Azure Databases for PostgreSQL MYSQL and MariaDBAzure Databases for PostgreSQL MYSQL and MariaDB
Azure Databases for PostgreSQL MYSQL and MariaDB
rockplace99 visualizações
데브시스터즈 데이터 레이크 구축 이야기 : Data Lake architecture case study (박주홍 데이터 분석 및 인프라 팀... por Amazon Web Services Korea
데브시스터즈 데이터 레이크 구축 이야기 : Data Lake architecture case study (박주홍 데이터 분석 및 인프라 팀...데브시스터즈 데이터 레이크 구축 이야기 : Data Lake architecture case study (박주홍 데이터 분석 및 인프라 팀...
데브시스터즈 데이터 레이크 구축 이야기 : Data Lake architecture case study (박주홍 데이터 분석 및 인프라 팀...
Amazon Web Services Korea5.7K visualizações

Mais de Amazon Web Services Korea

AWS Modern Infra with Storage Roadshow 2023 - Day 2 por
AWS Modern Infra with Storage Roadshow 2023 - Day 2AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2Amazon Web Services Korea
172 visualizações146 slides
AWS Modern Infra with Storage Roadshow 2023 - Day 1 por
AWS Modern Infra with Storage Roadshow 2023 - Day 1AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1Amazon Web Services Korea
102 visualizações173 slides
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ... por
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon Web Services Korea
220 visualizações86 slides
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev... por
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Web Services Korea
218 visualizações81 slides
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A... por
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...Amazon Web Services Korea
120 visualizações36 slides
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::... por
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Amazon Web Services Korea
114 visualizações29 slides

Mais de Amazon Web Services Korea(20)

AWS Modern Infra with Storage Roadshow 2023 - Day 2 por Amazon Web Services Korea
AWS Modern Infra with Storage Roadshow 2023 - Day 2AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2
Amazon Web Services Korea172 visualizações
AWS Modern Infra with Storage Roadshow 2023 - Day 1 por Amazon Web Services Korea
AWS Modern Infra with Storage Roadshow 2023 - Day 1AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1
Amazon Web Services Korea102 visualizações
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ... por Amazon Web Services Korea
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Web Services Korea220 visualizações
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev... por Amazon Web Services Korea
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Web Services Korea218 visualizações
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A... por Amazon Web Services Korea
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Amazon Web Services Korea120 visualizações
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::... por Amazon Web Services Korea
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon Web Services Korea114 visualizações
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal... por Amazon Web Services Korea
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon Web Services Korea140 visualizações
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,... por Amazon Web Services Korea
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Amazon Web Services Korea97 visualizações
From Insights to Action, How to build and maintain a Data Driven Organization... por Amazon Web Services Korea
From Insights to Action, How to build and maintain a Data Driven Organization...From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...
Amazon Web Services Korea162 visualizações
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special... por Amazon Web Services Korea
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon Web Services Korea181 visualizações
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L... por Amazon Web Services Korea
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
Amazon Web Services Korea353 visualizações
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti... por Amazon Web Services Korea
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
Amazon Web Services Korea314 visualizações
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ... por Amazon Web Services Korea
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
Amazon Web Services Korea268 visualizações
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ... por Amazon Web Services Korea
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
Amazon Web Services Korea260 visualizações
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노... por Amazon Web Services Korea
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
Amazon Web Services Korea294 visualizações
AWS Summit Seoul 2023 | Amazon Neptune 및 Elastic을 이용한 추천 서비스 및 검색 플랫폼 구축하기 por Amazon Web Services Korea
AWS Summit Seoul 2023 | Amazon Neptune 및 Elastic을 이용한 추천 서비스 및 검색 플랫폼 구축하기AWS Summit Seoul 2023 | Amazon Neptune 및 Elastic을 이용한 추천 서비스 및 검색 플랫폼 구축하기
AWS Summit Seoul 2023 | Amazon Neptune 및 Elastic을 이용한 추천 서비스 및 검색 플랫폼 구축하기
Amazon Web Services Korea290 visualizações
AWS Summit Seoul 2023 | 생성 AI 모델의 임베딩 벡터를 이용한 서버리스 추천 검색 구현하기 por Amazon Web Services Korea
AWS Summit Seoul 2023 | 생성 AI 모델의 임베딩 벡터를 이용한 서버리스 추천 검색 구현하기AWS Summit Seoul 2023 | 생성 AI 모델의 임베딩 벡터를 이용한 서버리스 추천 검색 구현하기
AWS Summit Seoul 2023 | 생성 AI 모델의 임베딩 벡터를 이용한 서버리스 추천 검색 구현하기
Amazon Web Services Korea439 visualizações
AWS Summit Seoul 2023 | 스타트업의 서버리스 기반 SaaS 데이터 처리 및 데이터웨어하우스 구축 사례 por Amazon Web Services Korea
AWS Summit Seoul 2023 | 스타트업의 서버리스 기반 SaaS 데이터 처리 및 데이터웨어하우스 구축 사례AWS Summit Seoul 2023 | 스타트업의 서버리스 기반 SaaS 데이터 처리 및 데이터웨어하우스 구축 사례
AWS Summit Seoul 2023 | 스타트업의 서버리스 기반 SaaS 데이터 처리 및 데이터웨어하우스 구축 사례
Amazon Web Services Korea205 visualizações
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례 por Amazon Web Services Korea
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
Amazon Web Services Korea341 visualizações
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기 por Amazon Web Services Korea
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기
AWS Summit Seoul 2023 | 실시간 CDC 데이터 처리! Modern Transactional Data Lake 구축하기
Amazon Web Services Korea406 visualizações

Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018

  • 1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 김민성 Solutions Architect / Amazon Web Services Bigdata Amazon Redshift 아키텍처 및 모범사례
  • 2. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. “Hive 대비 50~100배 빠른 성능” Amazon Redshift 빠른 성능 비용 효율적 데이터 레이크와의 통합 보안 $ Data lake 10011000010010101 11001010101110010 10110101100101 010100001 1/10 비용으로 빠르고, 손쉬운 확장을 지원하는 완전 관리형 DW “210억 행과 100억행 조인에 2 시간” “시간당 $0.25로 시작” ”년간 압축 데이터 기준 1TB에 $250~$333” “모든 Activity에 대한 감사” “저장부터 전송까지 전계층 암호화” “S3 (데이터레이크) 대 한 쿼리” ”AWS 다양한 서비스 와의 유연한 통합”
  • 3. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Amazon Redshift 데이터레이크와의 통합 Amazon S3 데이터 레이크 Redshift Spectrum 쿼리 엔진 • Amazon Redshift에서 S3데이터에 대한 쿼리 • 다양한 포멧 지원 (CSV, ORC, Gro, Avro, Parquet) • 빠른 쿼리 성능 • Compute과 Storage 에 대한 별도의 용량 관리 • On demand, 쿼리당 스켄 데이터에 기준한 비용 (TB 당 $5)
  • 4. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 만약 빅데이터 분석을 처음 시작하신다면…
  • 5. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 아키텍처 및 업데이트
  • 6. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Amazon Redshift 클러스터 아키텍처 • MPP 기반의 아키텍처 • Amazon S3로의 지속적엔 데이터 백업 • 리더 노드 • SQL 엔드포인트 • 메타데이터 저장소 • 병렬 SQL 쿼리 코디네이터 • 컴퓨팅 노드 • 로컬, 컬럼 기반의 스토리지 • 컴퓨팅 최적화 (DC), 스토리지 최적화 (DS) • 데이터 로드, 백업 및 복원 주체 • 2, 16, 32개 슬라이스 (Virtual Core 당) Redshift 클러스터 JDBC/ODBC 커넥션 리더 노드 컴퓻 노드 • 데이터 로딩 • 스트리밍 백업/복원 • 확장 스토리지 Amazon S3
  • 7. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 새로운 고밀도 컴퓨팅 노드 – DC2 “Amazon Redshift DC1에서 DC2로 이전한 후 월간 레포트 작성이 9배가 빨라 졌습니다.” - Bradley Todd, Technical Architect, Liberty Mutual NVMe SSD DDR4 Memory Intel E5-2686 v4 (Broadwell) 동일 가격에 DC1 대비 3배 높아진 I/O 성능과 30% 개선된 컴퓨팅 성능
  • 8. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 분석 및 BI, 대쉬 보드 도구 Amazon Redshift RESULTS CACHE QUERY_ID RESULT QUERY_ID RESULT 결과 캐싱 - 일초 미만의 쿼리 응답 속도 쿼리 실행 시간을 단축을 위한 쿼리 결과 메모리 케싱 • 기본 활성화 (관련 파라메터 enable_result_cache_for_session) • 캐시 조건 • 쿼리에 사용되는 객체에 대한 액세스 권한 보유 • Redshift 쿼리 관련 파라메터 및 조회하는 테이블내 데이터의 미변경 • 쿼리 실행 시마다 실행해야 하는 함수 (예: GETDATE) 미사용 • 리더 노드 사이즈 및 쿼리 결과 크기를 기준으로 캐싱 • 세션에 관계 없이 캐쉬 조회 • SVL_QLOG 뷰의 “source_query”항목을 통해 확인
  • 9. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 단기 쿼리 가속화 Short Query Acceleration (SQA) Amazon Redshift Machine Learning Class ifier 머신 러닝분석 및 BI, 대쉬 보드 도구 • 머신 러닝 알고리즘을 기반으로 단기 쿼리 판단 • 장기 쿼리뒤에서 단기 쿼리가 대기하지 않도록 SQA 전용 큐에서 단기 쿼리 실행 • SQA 조건 • GUI에서는 WML의 총 슬롯 수가 15개 이하여야 함 (CLI, API를 통해 SQA를 활성화 한 경우 해당 없음) • CTAS 및 읽기 전용 쿼리에 사용 • 기본값은 5초 (권장), 최대 20초까지 설정 • ‘STL_WLM_Query’의 ‘service_class’ 컬럼값이 14인 쿼리가 SQA를 통해 Acceleration된 쿼리 문이며, ‘final_state’를 통해 ‘Completed’ 또는 ‘Evicted’ 여부를 확인할 수 있음 장기 쿼리로 인한 체감 성능 저하 완화 및 동시성 확보
  • 10. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 노드 선택의 기준 • DC 또는 DS • IO Latency 요구 사항 및 필요 스토리지 용량 • 노드의 사이즈 • 쿼리의 수행 패턴 (Slice Level, Node Level) • Slice Level vs Node Level • Broadcast • 결과 캐싱 사용 여부 • 리더 노드 전용 함수 및 최종 Sorting, Aggregation (집계) 의 사용 • 최신 세대의 노드 리더 노드 전용 함수 날짜 함수 • AGE • CURRENT_TIME • CURRENT_TIMESTAMP • LOCALTIME • ISFINITE • NOW 문자열 함수 • ASCII • GET_BIT • GET_BYTE • SET_BIT • SET_BYTE • TO_ASCII
  • 11. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 노드 타입 및 클러스터 사이즈 변경 1. 기존 클러스터를 Read Only 모드로 변경 2. 변경된 노드 수량 및 노드 타입에 맞춰 신규 클러스터 생성 3. 클러스터의 데이터를 신규 클러스터로 병렬 전송 4. 기존 클러스터의 SQL Endpoint 변경 (DNS 활용) 5. 기존 클러스터 제거
  • 12. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 노드 타입 및 클러스터 사이즈 변경 1. 기존 클러스터를 Read Only 모드로 변경 2. 변경된 노드 수량 및 노드 타입에 맞춰 신규 클러스터 생성 3. 클러스터의 데이터를 신규 클러스터로 병렬 전송 4. 기존 클러스터의 SQL Endpoint 변경 (DNS 활용) 5. 기존 클러스터 제거
  • 13. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 노드 타입 및 클러스터 사이즈 변경 1. 기존 클러스터를 Read Only 모드로 변경 2. 변경된 노드 수량 및 노드 타입에 맞춰 신규 클러스터 생성 3. 클러스터의 데이터를 신규 클러스터로 병렬 전송 4. 기존 클러스터의 SQL Endpoint 변경 (DNS 활용) 5. 기존 클러스터 제거
  • 14. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 데이터 및 스키마 모델링
  • 15. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Columnar 스토리지 ID Date Amount Handling Items State Payment 1 10/1/2013 $53.50 5 1 VA Visa 2 10/1/2013 $100.25 8 3 MD MC 3 10/2/2013 $25.50 3 1 VA Debit 4 10/2/2013 $150.75 6 10 NC Visa 5 10/2/2013 $99.90 3 4 PA ACH 6 10/3/2013 $75.85 7 7 MD Visa 주문 테이블 (Order Table) “Select ID, Amount, State from Order” “ROW 스토리지” “Columnar 스토리지”
  • 16. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Columnar 스토리지 “적절한 크기의 데이터형 선언을 통한 성능 향상” • Redshift는 쿼리 수행 및 데이터 Ingestion시 선언된 Column의 크기를 기반으로 버퍼 준비 • 실 데이터 보다 큰 자료형은 메모리의 낭비를 가져올 수 있음 • SVV_TABLE_INFO 테이블의 ‘max_varchar’을 통해 가장 큰 열을 확인
  • 17. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 스키마 디자인 Star Snowflake
  • 18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 테이블 분산 스타일 분산 키 전체 (All) Node 1 Slice 1 Slice 2 Node 2 Slice 3 Slice 4 Node 1 Slice 1 Slice 2 Node 2 Slice 3 Slice 4 모든 데이터를를 각 노드에 전부 동일 키는 동일한 위치에 Node 1 Slice 1 Slice 2 Node 2 Slice 3 Slice 4 균등 라운드 로빈
  • 19. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 분산키에 따른 데이터 분산 Node 1 Slice 1 Slice 2 Node 2 Slice 3 Slice 4 user_profile user_id=1234 name=janet … user_profile user_id=6789 name=fred … cloudfront uri = /imgs/ad1.png user_id=2345 … user_profile user_id=2345 name=bill … cloudfront uri=/games/g10.exe user_id=4312 … user_profile user_id=4312 name=fred … order_line order_line_id = 25693 … “분산키는 레코드가 어느 슬라이스에 저장되게 될지를 결정함” cloudfront uri = /games/g1.exe user_id=1234 … cloudfront uri = /img/ad_5.img user_id=1234 … 테이블에서 동일 분산키를 갖 는 레코드는 동일 슬라이스 에 저장
  • 20. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 분산키에 따른 데이터 분산 Node 1 Slice 1 Slice 2 cloudfront uri = /games/g1.exe user_id=1234 … user_profile user_id=1234 name=janet … cloudfront uri = /imgs/ad1.png user_id=2345 … user_profile user_id=2345 name=bill … order_line order_line_id = 25693 … cloudfront uri = /img/ad_5.img user_id=1234 … 다른 테이블의 레코드의 경우에도 동일한 분산키를 사용하는 경우 동일 슬라이스에 저장 Node 2 Slice 3 Slice 4 user_profile user_id=6789 name=fred … cloudfront uri=/games/g10.exe user_id=4312 … user_profile user_id=4312 name=fred … 테이블에서 동일 분산키를 갖 는 레코드는 동일 슬라이스 에 저장 “분산키를 통한 조인 연산에 대한 데이터 지역성 확보”
  • 21. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 데이터 분산 여부의 판별 • 적절한 분산 처리 • Broadcast 발생 DS_DIST_NONE, DS_DIST_ALL_NONE DS_BCAST_INNER, DS_DIST_BOTH
  • 22. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 네트워크 Broadcast DS_DIST* INFO DS_DIST_NONE Preferred, no data transfer between nodes. DS_DIST_ALL_NONE One table has DISTSTYLE ALL, no data transfer between nodes. DS_DIST_ALL_INNER Inner table is being sent to the Single Node. DS_DIST_INNER Inner table is being redistributed in an outer join. DS_DIST_OUTER Outer table is being redistributed in an outer join. DS_BCAST_INNER Inner table is being broadcast to all nodes. DS_BCAST_BOTH Both tables are being broadcast to all nodes. 쿼리 수행에 있어 네트워크를 통한 데이터이동은 가장 비용이 비싼 오퍼레이션
  • 23. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 데이터 분산과 분산 키 Node 1 Slice 1 Slice 2 Node 2 Slice 3 Slice 4 cloudfront uri = /games/g1.exe user_id=1234 … cloudfront uri = /imgs/ad1.png user_id=2345 … cloudfront uri=/games/g10.exe user_id=4312 … cloudfront uri = /img/ad_5.img user_id=1234 … 2M records 5M records 1M records 4M records 적절치 못한 분산키 선택은 단일 슬라이스로의 데이터 쏠림 현상을 초래
  • 24. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 데이터 분산과 분산 키 Node 1 Slice 1 Slice 2 Node 2 Slice 3 Slice 4 cloudfront uri = /games/g1.exe user_id=1234 … cloudfront uri = /imgs/ad1.png user_id=2345 … cloudfront uri=/games/g10.exe user_id=4312 … cloudfront uri = /img/ad_5.img user_id=1234 … 2M records2M records 2M records 2M records 균등한 데이터 분산은 쿼리 성능 향상에 도움이 됨
  • 25. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 적절한 분산키의 선택 • 목적 • 각 노드에 균등하게 데이터 분산 • 데이터의 이동 최소화 : Co-located Joins & Aggregates • 분산키에 적절한 컬럼 • 가장 큰 테이블에서 조인에 활용되는 컬럼 • Group By 조건에서 사용되는 컬럼 • 높은 Cardinality를 보유한 컬럼 • 분산키에 적절치 않은 컬럼 • Where 조건절에서 활용되는 칼럼 • 데이터의 몰림을 유발하는 컬럼
  • 26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 팁! 분산키 어떻게 선택할까? 1. 가장 큰 Dimension Table의 Primary키와 Fact Table의 Foreign키 를 Dist Key로 선택 2. 나머지 조인이 되는 조건의 Dimension Table은 Distribution ALL 을 검토 한다. “300만개 이하의 경우 데이터 분산 타입을 전체 (ALL)로 선택해도 무방"
  • 27. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 팁! 분산키 어떻게 선택할까? 1. 가장 자주 활용되는 쿼리를 확인합니다. 예 “awslabs/amazon-redshift-utils/AdminScripts/top-queries.sql” 활용 등 2. 조인 또는 Group By에 활용되며 고른 데이터 분포 및 높은 Cardinality 보유한 컬럼 을 선택 합니다. 3. 그게 아니라면…. “Fact Table은 Even으로 Dimension Table은 ALL로” “참고 : MPP 형태의 스키마는 테이블 내에 모든 데이터를 보유하기 때문에 Distribution style 은 Even으로“ “3정규화 형태의 Inmon 모델은 노드 수량은 줄이고 노드 크기는 키우거나 Star Schema로 전환"
  • 28. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 데이터 정렬
  • 29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 성능 향상 1. 보다 높은 하드웨어 스펙 2. 병렬화의 달성 3. 네트워크를 통한 트레픽의 최소화 “스토리지 I/O의 최소화”
  • 30. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SELECT COUNT(*) FROM LOGS WHERE DT = ‘09-JUNE-2015’ • Zone Map : 각 Block에 대한 최대값 및 최소값에 대한 정보 저장 Zone Map과 정렬
  • 31. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 정렬 키 • 정렬 키가 지정된 테이블의 경우 데이터 로드시 정렬 순서대로 디스크에 저장 • 정렬키의 종류 • 정렬 키: 테이블의 단일 컬럼의 값을 기준으로 데이터를 정렬하여 저장 • 복합 정렬키 (Compound Sort Key): • 다수의 컬럼을 활용 (최대 6개) 활용하여 정렬 키로 활용 • 선언한 순서에 따라 순차적으로 정렬되어 저장됨 • 조인 및 Group By, Order By에 효과적이며, 특히 사전에 순서대로 정렬이 되어 있기 때문에 Merge 조인에 효과적 • 인터리브 정렬키 (Interleaved Sort Key) • 다수의 컬럼을 활용 (최대 8개) 활용하여 정렬 키로 활용 • 정렬 키에서 각 열, 즉 열의 하위 집합에 똑같은 가중치를 부여 • AD-Hoc 형태의 쿼리에서 높은 성능을 제공함
  • 32. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 복합 정렬 키 vs 인터리브 정렬 키 • 키 선언 : Product (type, color, size) • 복합 정렬키 type, color, size • Where type = ‘shirt’ and color=‘red’ and size = ‘xl’: 정렬을 기반한 가장 우수한 성능 • Where type = ‘shirt’ and color=‘red’: 약간 효과적 • Where type = ‘shirt’ and size = ‘xl’: 제한적으로 성능에 기여함 • 인터리브 정렬키 type, color, size • 조회시 type, color, size 순서등에 관계 없이 일관성 있는 성능 제공
  • 33. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 그리고…
  • 34. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 쿼리 분석 EXPLAIN 커맨드와 실제 쿼리 수행: EXPLAIN은 쿼리 수행과 관련된 정보 • 수행된 오퍼레이션 및 그에 대한 비용 • 쿼리에 사용된 테이블 및 컬럼 정보 • 프로세싱에 사용될 데이터의 크기 참고 : https://docs.aws.amazon.com/redshift/latest/dg/c-the-query-plan.html explain select avg(datediff(day, listtime, saletime)) as avgwait from sales, listing where sales.listid = listing.listid; QUERY PLAN XN Aggregate (cost=6350.30..6350.31 rows=1 width=16) -> XN Hash Join DS_DIST_NONE (cost=47.08..6340.89 rows=3766 width=16) Hash Cond: ("outer".listid = "inner".listid) -> XN Seq Scan on listing (cost=0.00..1924.97 rows=192497 width=12) -> XN Hash (cost=37.66..37.66 rows=3766 width=12) -> XN Seq Scan on sales (cost=0.00..37.66 rows=3766 width=12)
  • 35. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 파일 분산 및 병렬 로딩 client.aa client.ab client.ac client.ad Node 0 Slice 0 Slice 1 Node1 Slice 0 Slice 1 { "entries": [ {"url":"s3://mybucket-alpha/client.aa", "mandatory":true}, {"url":"s3://mybucket-alpha/client.ab", "mandatory":true}, {"url":"s3://mybucket-beta/client.ac", "mandatory":true}, {"url":"s3://mybucket-beta/client.ad", "mandatory":true} ] } 매니페스트 파일 copy customer from 's3://mybucket/cust.manifest' iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole' manifest; Copy 커멘트를 통한 실행
  • 36. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 압축 analyze compression listing; Table | Column | Encoding ---------+----------------+---------- listing | listid | delta listing | sellerid | delta32k listing | eventid | delta32k listing | dateid | bytedict listing | numtickets | bytedict listing | priceperticket | delta32k listing | totalprice | mostly32 listing | listtime | raw ID Age State Amount 123 20 CA 500 345 25 WA 250 678 40 FL 125 957 37 WA 375 • 압축을 기반으로 디스크 사용량 및 I/O 더욱 줄일 수 있습니다. • COPY 커멘트 사용시 10만 행을 우선 적제 후 압축 옵션 평가 (COMPUDATE on) • “ANALYZE COMPRESSION” 커멘트 를 통해 현재 압축 (인코딩)에 대한 평가 후 “ALTER TABLE”로 변경 2x ~ 4x
  • 37. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 기타 • Vacuum • 변경되거나 삭제된 블럭에 대한 정리 • 정렬키에 맞춰 데이터 정렬 • 옵션 : FULL, SORT ONLY, DELETE ONLY, REINDEX (인터리브 정렬키) • 통계 업데이트 • 통계 업데이트 자동 실행 • CREATE (TEMP) TABLE AS SELECT • SELECT INTO • COPY (with COMPUPDATE ON) • 통계 업데이트를 실행해줘야 하는 경우 • 기존 데이터의 5%이상에 대해 변경이 있는 경우 • 외례키를 추가하거나 삭제한 경우 • Vacuum 실행 후 • 제약 조건 (not null, primary, foreign, unique)은 쿼리 옵티마이저가 활용
  • 38. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. S3 데이터레이크와 통합 Amazon Redshift Spectrum
  • 39. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Redshift Spectrum S3의 수천개 이상의 노드들을 활용하여 쿼리 실행 Fast @ exabyte scale Elastic & highly available On-demand, pay-per-query High concurrency: Multiple clusters access same data No ETL: Query data in-place using open file formats Full Amazon Redshift SQL support S3 SQL
  • 40. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 데모 아키텍처
  • 41. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SELECT c.c_name, c.c_mktsegment, t.prettyMonthYear, SUM(uv.adRevenue) FROM clickstream.uservisits_csv10 as uv RIGHT OUTER JOIN customer as c ON c.c_custkey = uv.custKey INNER JOIN ( SELECT DISTINCT d_yearmonthnum, (d_month||','||d_year) as prettyMonthYear FROM dwdate WHERE d_yearmonthnum >= 199810 ) as t ON uv.yearMonthKey = t.d_yearmonthnum WHERE c.c_custkey <= 3 GROUP BY c.c_name, c.c_mktsegment, t.prettyMonthYear, uv.yearMonthKey ORDER BY c.c_name, c.c_mktsegment, uv.yearMonthKey ASC XN Merge (cost=1141056800867.31..1141056801917.31 rows=420000 width=78) -> XN Network (cost=1141056800867.31..1141056801917.31 rows=420000 width=78) -> XN Sort (cost=1141056800867.31..1141056801917.31 rows=420000 width=78) -> XN HashAggregate (cost=141056760589.25..141056761639.25 rows=420000 width=78) -> XN Hash Join DS_DIST_ALL_NONE (cost=37.34..141056596142.86 rows=13155711 width=78) -> XN Hash Join DS_DIST_ALL_NONE (cost=4.50..141051766084.98 rows=375877435 width=46) -> XN Hash (cost=3.75..3.75 rows=300 width=38) -> XN Seq Scan on customer c (cost=0.00..3.75 rows=300 width=38) -> XN Hash (cost=32.82..32.82 rows=7 width=36) -> XN Subquery Scan t (cost=0.00..32.82 rows=7 width=36) -> XN Unique (cost=0.00..32.75 rows=7 width=18) -> XN Seq Scan on dwdate (cost=0.00..32.43 rows=64 width=18) -> XN Seq Scan PartitionInfo of clickstream.uservisits_csv10 uv (cost=0.00..10.00 rows=1000 width=0) -> XN S3 Query Scan uv (cost=0.00..93969358.62 rows=3758774345 width=16) clickstream.uservisits_csv10 as uv rows=3758774345 • 결과 : 약 4분 47초 • CSV 포멧 • 파티셔닝 없음
  • 42. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SELECT c.c_name, c.c_mktsegment, t.prettyMonthYear, SUM(uv.adRevenue) FROM clickstream.uservisits_parquet1 as uv RIGHT OUTER JOIN customer as c ON c.c_custkey = uv.custKey INNER JOIN ( SELECT DISTINCT d_yearmonthnum, (d_month||','||d_year) as prettyMonthYear FROM dwdate WHERE d_yearmonthnum >= 199810 ) as t ON uv.yearMonthKey = t.d_yearmonthnum WHERE c.c_custkey <= 3 GROUP BY c.c_name, c.c_mktsegment, t.prettyMonthYear, uv.yearMonthKey ORDER BY c.c_name, c.c_mktsegment, uv.yearMonthKey ASC XN Merge (cost=1141056800867.31..1141056801917.31 rows=420000 width=78) -> XN Network (cost=1141056800867.31..1141056801917.31 rows=420000 width=78) -> XN Sort (cost=1141056800867.31..1141056801917.31 rows=420000 width=78) -> XN HashAggregate (cost=141056760589.25..141056761639.25 rows=420000 width=78) -> XN Hash Join DS_DIST_ALL_NONE (cost=37.34..141056596142.86 rows=13155711 width=78) -> XN Hash Join DS_DIST_ALL_NONE (cost=4.50..141051766084.98 rows=375877435 width=46) -> XN Hash (cost=3.75..3.75 rows=300 width=38) -> XN Seq Scan on customer c (cost=0.00..3.75 rows=300 width=38) -> XN Hash (cost=32.82..32.82 rows=7 width=36) -> XN Subquery Scan t (cost=0.00..32.82 rows=7 width=36) -> XN Unique (cost=0.00..32.75 rows=7 width=18) -> XN Seq Scan on dwdate (cost=0.00..32.43 rows=64 width=18) -> XN Seq Scan PartitionInfo of clickstream.uservisits_parquet1 uv (cost=0.00..10.00 rows=1000 width=0) -> XN S3 Query Scan uv (cost=0.00..93969358.62 rows=3758774345 width=16) clickstream.uservisits_parquet1 as uv rows=3758774345 • 결과 : 약 26초 • Parquet 포멧 (Columnar 포멧) • 파티셔닝 없음
  • 43. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 44. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SELECT c.c_name, c.c_mktsegment, t.prettyMonthYear, uv.totalRevenue FROM ((SELECT customer, visitYearMonth, SUM(adRevenue) as totalRevenue FROM clickstream.uservisits_parquet1 WHERE customer <= 3 and visitYearMonth >= 199810 GROUP BY customer, visitYearMonth) as uv RIGHT OUTER JOIN customer as c ON c.c_custkey = uv.customer INNER JOIN ( SELECT DISTINCT d_yearmonthnum, (d_month||','||d_year) as prettyMonthYear FROM dwdate WHERE d_yearmonthnum >= 199810 ) as t ON uv.visitYearMonth = t.d_yearmonthnum ) ORDER BY c.c_name, c.c_mktsegment, uv.visitYearMonth ASC XN Merge (cost=1000094008880.16..1000094008880.18 rows=7 width=78) -> XN Network (cost=1000094008880.16..1000094008880.18 rows=7 width=78) -> XN Sort (cost=1000094008880.16..1000094008880.18 rows=7 width=78) -> XN Hash Join DS_DIST_ALL_NONE (cost=94008878.97..94008880.06 rows=7 width=78) -> XN Hash Join DS_DIST_ALL_NONE (cost=93971378.97..93971379.61 rows=7 width=48) -> XN Subquery Scan uv (cost=93971346.13..93971346.42 rows=23 width=16) -> XN HashAggregate (cost=93971346.13..93971346.19 rows=23 width=16) -> XN Hash (cost=32.82..32.82 rows=7 width=36) -> XN Subquery Scan t (cost=0.00..32.82 rows=7 width=36) -> XN Unique (cost=0.00..32.75 rows=7 width=18) -> XN Seq Scan on dwdate (cost=0.00..32.43 rows=64 width=18) -> XN Hash (cost=30000.00..30000.00 rows=3000000 width=38) -> XN Seq Scan on customer c (cost=0.00..30000.00 rows=3000000 width=38) -> XN Seq Scan PartitionInfo of clickstream.uservisits_parquet1 (cost=0.00..17.50 rows=112 width=8) -> XN S3 Query Scan uservisits_parquet1 (cost=46984679.32..46984689.32 rows=1000 width=8) customer <= 3 and visitYearMonth >= 199810 rows=3000000 • 결과 : 약 3초 • Parquet 포멧 (Columnar 포멧) • 파티셔닝 : customer, visitYearMonth
  • 45. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. EMR을 활용한 ORC, Parquet 형태로 데이터 변경 하이브 쿼리 (CREATE TABLE AS SELECT)를 통해 변경 CREATE TABLE data_converted STORED AS PARQUET AS SELECT col_1, col2, col3 FROM data_source Spark Script 활용 사례 : ELB 1TB 로그 변환 - 1TB의 ROW기반 데이터를 Parquet 변환시 130GB까지 축소 (압축 코덱 Snappy) - EMR 비용 : 5$ 참고 : https://github.com/awslabs/aws-big-data-blog/tree/master/aws-blog-spark-parquet-conversion AWS Glue 활용
  • 46. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Redshift Spectrum Best Practice • 파티셔닝 및 Columnar 파일 포맷 (ORC, Parquet) 사용 • 파티셔닝 컬럼의 조건 • 필터 및 조인의 조건이 되는 컬럼 • 비니지스 유닛 • 비니지스 그룹 • 날짜 및 시간 • 파일의 갯수는 Redshift의 Slice의 수량 이상 • 파일의 크기는 64MB 이상을 권고 • 각 파일은 동일한 크기를 권고
  • 47. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 마무리 하며, • Redshift 도구 모음: https://github.com/awslabs/amazon-redshift-utils • Redshift 커스톰 모니터링 도구: https://github.com/awslabs/amazon-redshift-monitoring • Amazon Redshift Column Encoding Utility: https://github.com/awslabs/amazon-redshift-utils/tree/master/src/ColumnEncodingUtility • Analyze & Vacuum Schema Utility: https://github.com/awslabs/amazon-redshift-utils/tree/master/src/AnalyzeVacuumUtility • 마이크로 배치 로딩: https://aws.amazon.com/blogs/big-data/best-practices-for-micro-batch-loading-on- amazon-redshift/
  • 48. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 오늘 마무리 못한 이야기들은… “Go Builder Theater“ Day 2 오후 3시 20분 ~ 3시 50분 Redshift 못다한 이야기
  • 49. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS Summit 모바일 앱과 QR코드를 통 해 강연 평가 및 설문 조사에 참여해 주 시기 바랍니다. 내년 Summit을 만들 여러분의 소중한 의 견 부탁 드립니다. #AWSSummit 해시태그로 소셜 미디어에 여러분의 행사 소 감을 올려주세요. 발표 자료 및 녹화 동영상은 AWS Korea 공식 소셜 채널로 공유될 예정입니다. 여러분의 피드백을 기다립니다!