SQL Server 2000 meparkmicrosoft com SQL Product Specialist

  • Slides: 47
Download presentation
대용량 데이터베이스를 지원하기 위한 SQL Server 2000 기능 박명은(mepark@microsoft. com) SQL Product Specialist Microsoft

대용량 데이터베이스를 지원하기 위한 SQL Server 2000 기능 박명은(mepark@microsoft. com) SQL Product Specialist Microsoft Korea

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

확장된 SQL Server 2000 엔진 Top n Sort v 아래 Form과 같은 쿼리를 처리하기

확장된 SQL Server 2000 엔진 Top n Sort v 아래 Form과 같은 쿼리를 처리하기 위해 효과적인 엔진 n SELECT TOP 5 * FROM ORDERS ORDER BY ORDER_ID DESC SQL Server 7. 0 Full Sort SQL Server 2000 Top n Engine

확장된 SQL Server 2000 엔진 Merry –Go-Round 스캔 Without Merry-go-round scans: User 1: 25%

확장된 SQL Server 2000 엔진 Merry –Go-Round 스캔 Without Merry-go-round scans: User 1: 25% Scanned User 1: 50% Scanned User 2: 25% Scanned With Merry-go-round scans: User 1: 25% Scanned User 2: Starts Scanning User 1: Scan Complete User 2: 75% Scanned User 2: Remaining 25% Scanned Can result in disk thrashing during large table scans!

확장된 SQL Server 2000 엔진 확장된 병렬처리 CPU 1 CPU 2 8 K 8

확장된 SQL Server 2000 엔진 확장된 병렬처리 CPU 1 CPU 2 8 K 8 K 8 K 8 K 8 K 8 K SDES Parallel Page Supplier Crit. Sec Readahead I/O v 아키텍쳐는 한번에 16 pages 처리함 8 K 8 K

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

그외 인덱싱 특징 v v v 내림차순 index 지원 CREATE INDEX I 1 on

그외 인덱싱 특징 v v v 내림차순 index 지원 CREATE INDEX I 1 on T 1 (C 1 ASCENDING, C 2 DESCENDING) 계산된 컬럼에 인덱스를 생성할수 있음 CREATE TABLE t 1 (a int, b int, c AS a/b) GO CREATE UNIQUE CLUSTERED INDEX Idx 1 ON t 1. c GO 단일 질의에 대해서 멀티 인덱스를 사용할수 있 음

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

데이터 로드 방안 v v v BCP DTS Bulk Insert

데이터 로드 방안 v v v BCP DTS Bulk Insert

Bulk Load 성능 v v CPUs 수에 따라서 linearly하게 속도 증가 각 CPU당 거의

Bulk Load 성능 v v CPUs 수에 따라서 linearly하게 속도 증가 각 CPU당 거의 100% 향상 500 MHz Xeon™ Typical

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

백업 및 복구 모델 From To Full Bulk_Logged Simple l l Bulk_Logged Simple No

백업 및 복구 모델 From To Full Bulk_Logged Simple l l Bulk_Logged Simple No change Database backup after change No Change Database backup after change Last log backup just prior to change FULL BULK_LOGGED doesn’t break automated backup procedures Transitions to and from SIMPLE require more care but are uncommon

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

장애조치 클러스터링 SQL Server 2000 클러스터의 모든 노드간의 장애 조치 및 장애 복구 기능과

장애조치 클러스터링 SQL Server 2000 클러스터의 모든 노드간의 장애 조치 및 장애 복구 기능과 SQL Server 2000 설치 프로그램을 통해 클러스터에서 노드를 추가하거나 제거하는 기능, 다른 클러스터 노드 인스턴스에는 영향을 주지 않고 임의의 노드에 클러스터 인스턴스를 다시 설치하거나 재작성하는 기능제공합니다. Client PCs Server A SQL Server Client PCs Server B Server A Cluster managemen t Heartbeat Server B Exchange Server A Disk cabinet A Server A SQL Server B Cluster managemen t Heartbeat Disk cabinet B Disk cabinet A 설치시 직접 클러스터 환경 설치가 가능하며, Active/Passive 또는 Active/Active장애조치를 할 수 있으며, 4 -Node까지 클러스터 지원합니다. Disk cabinet B Server B Exchange Server SQL Server

로그전달 – Standby Server 주기적으로 로그정보 전달, 장애 발생시 Standby Server에서 지속적인 서비스 Monitor

로그전달 – Standby Server 주기적으로 로그정보 전달, 장애 발생시 Standby Server에서 지속적인 서비스 Monitor Standby (Destination server) Primary (Source server) Transaction Log Backup Restore Network Users Client workstations

복제 모델 Central Publisher/Distributor Publisher/ Distributor Subscribers Central Subscriber/Multiple Publishers/Multiple Subscribers Publisher/ Distributor Subscriber

복제 모델 Central Publisher/Distributor Publisher/ Distributor Subscribers Central Subscriber/Multiple Publishers/Multiple Subscribers Publisher/ Distributor Subscriber Publisher/ Distributor/ Subscriber

데이터베이스 복제 Publisher l Maintains source databases l Makes data available for replication Distributor

데이터베이스 복제 Publisher l Maintains source databases l Makes data available for replication Distributor l Receives and stores changes l Forwards changes to subscribers (Publication and distribution servers can be combined on one server) Subscriber l Receives data changes l Holds copy of data

가용성: 복제 ( Replication ) 요구되는 트랜잭션의 성격에 따라 다양한 방법 선택 가능. Merge

가용성: 복제 ( Replication ) 요구되는 트랜잭션의 성격에 따라 다양한 방법 선택 가능. Merge Replication 인터넷을 통해서도 가능함. Snapshot Replication with Immediate or Queued Updating Subscriptions Higher Autonomy Higher Latency Transactional Replication with Immediate or Queued Updating Subscriptions Distributed Transactions l Snapshot Replication Ø Periodic bulk transfer of new Lower Autonomy snapshots of data Lower Latency l Transactional Replication Ø l Replication of incremental changes Merge Replication Ø Autonomous changes to replicated data are later merged

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

Indexed Views Large Table Indexed View CREATE VIEW Example. View (Pri. Key, Sum. Colx,

Indexed Views Large Table Indexed View CREATE VIEW Example. View (Pri. Key, Sum. Colx, Count. Co Count. C AS SELECT Pri. Key, SUM(Colx), COUNT_BIG(Colx) FROM My. Table GROUP BY Pri. Key

Performance Impact Indexed Views

Performance Impact Indexed Views

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

파일 및 파일그룹 파티션 Data Partitions Index Partitions v Month = 12 v Month

파일 및 파일그룹 파티션 Data Partitions Index Partitions v Month = 12 v Month n = … Month = 3 Month = 2 Month = 1 v v File Group Q 1 Separate Files File M 1, M 2, M 3 Placement of data on individual files or file groups Granularity improves loading / purging / backup & restore Separation improves I/O throughput (parallelism) and reduces contention Clean implementation prevents databases from sharing same files

파티션 뷰 는 하나 이상의 테이블들을 파트셔닝 컬 럼을 가지고 UNION ALL 한 업데이트닝

파티션 뷰 는 하나 이상의 테이블들을 파트셔닝 컬 럼을 가지고 UNION ALL 한 업데이트닝 가능한 뷰 임 Example: CREATE TABLE Customers_AH ( Customer. ID nchar (5) NOT NULL CHECK PRIMARY KEY CLUSTERED (Customer. ID) CREATE TABLE Customers_IP ( Customer. ID nchar (5) NOT NULL CHECK 'I' AND 'Q'), PRIMARY KEY CLUSTERED (Customer. ID) CREATE TABLE Customers_QZ ( Customer. ID nchar (5) NOT NULL CHECK PRIMARY KEY CLUSTERED (Customer. ID) CREATE VIEW SELECT * CUSTOMER AS FROM CUSTOMER_AH FROM CUSTOMER_IP FROM CUSTOMER_QZ UNION ALL (Customer. ID < 'I'), ) (Customer. ID BETWEEN ) (Customer. ID > 'Q'), )

분산 파티션 뷰 IIS Svr 1 IIS Svr 2 IIS Svr 3 IIS Svr

분산 파티션 뷰 IIS Svr 1 IIS Svr 2 IIS Svr 3 IIS Svr 4 IIS Svr 5 IIS Svr 6 SQL Server CREATE VIEW Customers AS SELECT <local>. Customers 1 UNION ALL SELECT <Svr 2>. Customers 2 UNION ALL SELECT <Svr 3>. Customers 3 UNION ALL SELECT <Svr 4>. Customers 4 UNION ALL SELECT <Svr 5>. Customers 5 UNION ALL SELECT <Svr 6>. Customers 6 IIS CREATE VIEW Customers AS SELECT <Svr 1>. Customers 1 UNION ALL SELECT <Svr 2>. Customers 2 UNION ALL SELECT <Svr 3>. Customers 3 UNION ALL SELECT <Svr 4>. Customers 4 UNION ALL SELECT <local>. Customers 5 UNION ALL SELECT <Svr 6>. Customers 6

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n

Agenda v v v VLDB Trends & Support Technology SQL Server 2000 Technologies n RDBMS 자체 내에서의 VLDB Support n 인덱스 생성 및 관리 n 신규데이터 대량 로드 n 백업과 복구 n 장애 복구 n 튜닝 n 부분 데이터 처리 SQL Server 64 bit

Hardware Support Itanium 2 -based Systems v HP n n n v Unisys n

Hardware Support Itanium 2 -based Systems v HP n n n v Unisys n n v 2 -way rx 2600, 12 GB RAM 4 -way rx 5670, 48 GB RAM 8 -way (Q 403) 16 -way (Q 403) 64 -way Super. Dome (Q 303) 16 -way ES 7000 Aries 130 32 -way (2 x 16 -way) ES 7000 Orion 130 NEC n 32 -way Express 5800/1320 Xc

Scalability Leadership New #1 Result! 800, 000 700, 000 650, 000 707, 102 600,

Scalability Leadership New #1 Result! 800, 000 700, 000 650, 000 707, 102 600, 000 550, 000 2 Windows Server 2003 500, 000 450, 000 Windows 2000 Server 400, 000 tpm. C 350, 000 300, 000 250, 000 200, 000 150, 000 100, 000 50, 000 0 1 P 2 P 4 P 8 P 16 P 32 P Top Non-clustered Scalability and Price Performance Source: www. tpc. org. Results as of 5 -19 -03. 64 P

대용량 해외사례 v 25+ Terabyte 이거나 대용량 트랜잭션 실제 운영 사이트 n 실제 운영되고

대용량 해외사례 v 25+ Terabyte 이거나 대용량 트랜잭션 실제 운영 사이트 n 실제 운영되고 있는 사이트 n 7+TB Telco Billing reporting system 15 TB까지 증가 n 3 TB GIS 매핑 시스템 10 -20 TB 증가 n 13 TB 채무처리 금융 어플리케이션 n 현재 50 TBs 정도의 대용량 사이트 구축중 v High Volume mission Critical applications 운영사이트 n Trading 어플리케이션 60000+ Database transactions / sec 초과 n Credit card 관리 시스템 3000 authentications/sec 처 리 n 은행 어플리케이션 processing money transfers of greater than 40 m trx / day while reporting is active

참조할 사이트 v v v Microsoft SQL Server Korea Site http: //www. microsoft. com/korea/sql

참조할 사이트 v v v Microsoft SQL Server Korea Site http: //www. microsoft. com/korea/sql Microsoft SQL Server 2000 by Example: http: //www. solidqualitylearning. com/Books. htm SQL Server Magazine: http: //www. sqlmag. com Professional Association of SQL Server: http: //www. sqlpass. org Solid Quality Learning: http: //www. solidqualitylearning. com Microsoft SQL Server site: http: //www. microsoft. com/sql

참조할 사이트 v v v SQL Server UK User Group: www. sqlserverfaq. com Newsgroups:

참조할 사이트 v v v SQL Server UK User Group: www. sqlserverfaq. com Newsgroups: news: //msnews. microsoft. com: n Microsoft. public. sqlserver. programming n Microsoft. public. sqlserver. tools n Microsoft. public. sqlserver n Microsoft. public. es. sqlserver Swynk: http: //www. swynk. com