SlideShare a Scribd company logo
1 of 25
Download to read offline
NEED SHARDING? HERE IT IS!
Oracle 12.2 Sharded Database Management
ABOUT ME
➤ Kamus@Enmotech 张乐奕
➤ Travel and Starbucks
➤ Travel: Japan
➤ Starbucks: Venti Caramel Macchiato
➤ Games: Blizzard fans, Hearthstone
➤ Channel[K]: http://www.dbform.com
WHATISSHARDING
Every shard is a part of logical database
WHAT IS SHARDING EXACTLY
//Query single row
select User_Name from T1 where User_ID=1;
//Query all
create view T as select * from T1 union all select * from T2;
select count(*) from T;
Database “DB” Database “DB”
Split Table
Table “T”
User_ID User_Name
1 Kim
2 Tim
3 Jim
4 Sim
Table “T1”
User_ID User_Name
1 Kim
3 Jim
Table “T2”
User_ID User_Name
2 Tim
4 Sim
WHAT IS SHARDING EXACTLY
//Query single row
select User_Name from T where User_ID=1;
//Query all
select count(*) from T;
Database “DB” Database “DB”
Partition Table
Table “T”
User_ID User_Name
1 Kim
2 Tim
3 Jim
4 Sim
Partition “P1”
User_ID User_Name
1 Kim
3 Jim
Partition“P2”
User_ID User_Name
2 Tim
4 Sim
Table “T”
WHAT IS SHARDING EXACTLY
//Query single row
select User_Name from T where User_ID=1;
//Query all
select count(*) from T;
Database “DB” Database “DB1”
Shard Table
Table “T”
User_ID User_Name
1 Kim
2 Tim
3 Jim
4 Sim
Shard “S1”
User_ID User_Name
1 Kim
3 Jim
Shard “S2”
User_ID User_Name
2 Tim
4 Sim
Database “DB2”
Table “T”
WHY NEED SHARDING? BENEFITS OF SHARDING
➤ Extreme Scalability
➤ Scale Out vs. Scale Up
➤ Fault Isolation
➤ No shared SAN
➤ Global Data Distribution
➤ Store particular data close to its consumers
➤ Pilot & Rolling Upgrades
➤ First test the changes on a small subset of data.
➤ Cost Down
➤ Because the size of a shard can be made arbitrarily small, deploying an SDB in a cloud consisting of
low-end commodity servers with local storage becomes easy. 

DATABASE SPLITTING HISTORY IN WEB COMPANIES
➤ All business on Single database
➤ All business on Master+Slave databases, write/read separated.
➤ Business separated, each business on separated Master+Slave databases.
➤ Area based/Hash based, table horizontal split, each part of business on separated Master+Slave
databases.
Database “DB”
Write
Read
Master Database “DB1”
Write
Slave Database “DB2”
Read
Replication
Master Database “DB1-1”
Write
Slave Database “DB1-2”
Read
Replication
Master Database “DBN-1”
Write
Slave Database “DBN-2”
Read
Replication
Master Database “DB1-1”
Write
Slave Database “DB1-2”
Read
Replication
Master Database “DB1-1”
Write
Slave Database “DB1-2”
Read
Replication
Master Database “DB1-1”
Write
Slave Database “DB1-2”
Read
Replication
Master Database “DBN-1”
Write
Slave Database “DBN-2”
Read
Replication
Master Database “DBN-1”
Write
Slave Database “DBN-2”
Read
Replication
Master Database “DBN-1”
Write
Slave Database “DBN-2”
Read
Replication
DISADVANTAGES OF SHARDING
➤ Is it transparent to application developer?
➤ Which database should access?
➤ How to sum query all databases?
➤ How to join query all databases?
Database access layer/Data access route layer
➤ Proxy-Free:MySQL Fabric, TDDL
➤ Proxy:MySQL Proxy, Atlas(Qihoo),Cobar
}
➤ Single point of failure
➤ Failover more complex
➤ Backups more complex
➤ Modification more complex
HOW MANY SHARDING SOLUTIONS?
➤ SQL
➤ MySQL with MySQL Fabric
➤ Postgres-XC and Greenplum
➤ Teradata
➤ No-SQL
➤ Apache HBase
➤ MongoDB
➤ New-SQL
➤ Google Spanner
And NOW
is coming!
WHAT IS
ORACLE SHARDING
Every shard is a part of logical database
GLOBAL DATA SERVICE - GDS
➤ What is GDS
➤ Instance->Service->Global Service
➤ GDS Capabilities
➤ Workload routing(region-based or lag-based)
➤ Load balancing(Connect-time or Run-time)
➤ Global service failover/role-based failover
➤ Released in Oracle database 12.1
➤ GSM(Global Service Manager)
➤ GDS Catalog
➤ Must reside in Oracle database 12c
➤ Recommended to co-hosted with RMAN catalog or
OEM repository
GDS DEPLOYMENT OVERVIEW
➤ Install GSM software on GSM servers
➤ Minimum 1 GSM per region
➤ Recommended 3 GSMs/region
➤ Setup GDS administrator accounts & privileges
➤ Configure GDS
➤ Create GDS catalog
➤ Add GSMs,Regions, Pools, Databases, Global Services
➤ Setup client connectivity
➤ Clients connect to GSM instead of the database listener
GDS USE CASES - ROLE BASED GLOBAL SERVICES FOR ACTIVE DATA GUARD
➤ Order Service
runs on Primary
➤ Reporting Service
runs on Standby
➤ Upon Data
Guard role
change, GDS fails
over services
based on Role
GDSCTL> add service -service order_srvc -gdspool sales -
preferred_all -role PRIMAY;
GDSCTL> add service -service reporting_srvc -gdspool sales
-preferred_all -role PHYSICAL_STANBY -failover_primay;
GDS USE CASES - REPLICATION LAG TOLERANCE IN ACTIVE DATA GUARD
➤ Specify replication
lag limit for a
service
➤ GDS ensures that
service runs on
Active Data Guard
standby(s) with lag
less than this limit
➤ Improved data
quality
GDSCTL> add service -service reporting_srvc -gdspool
sales –preferred_all –role PHYSICAL_STANDBY –lag 180;
ORACLE SHARDING USE CASE
Oracle Sharding is implemented based on the Oracle Database partitioning feature.
Oracle Sharding is “Distribute Partitioning”.
ORACLE SHARDING KNOWHOW
➤ Table family
➤ Parent-child relationship tables
➤ In Oracle Database 12c Release 2, only a single table family is supported in an
SDB
Sharding Key
ORACLE SHARDING KNOWHOW
➤ Consistent Hash
➤ Traditional hash: bucket number is calculated as HF(key) % N
➤ Oracle linear hashing: buckets number is power of 2, if not, data is not even.
➤ Consistent hashing: partitioning by the range of hash values
➤ When add/remove shards, only move chunks, does not change contents of
chunks
➤ When chunk is split, hash values divide into 2 ranges, other chunks no infect
ORACLE SHARDING KNOWHOW
➤ Tablespace set
➤ Before creating a sharded table partitioned by consistent hash, a set of tablespaces (one tablespace per
chunk) has to be created to store the table partitions.
➤ Chunk
➤ A chunk contains a single partition from each table of a table family
➤ Default, 120 chunks per shard, or specified when CREATE SHARDCATALOG by using GDSCTL
➤ The unit of data migration between shards is the chunk.
Customers_P1(1-1000000) Orders_P1 Lineitems_P1Chunk #1
ORACLE SHARDING KNOWHOW
➤ Duplicated table
➤ Synchronizes the contents of duplicated tables using Materialized View Replication
➤ A duplicated table on each shard is represented by a read-only materialized view.
➤ Automatically refreshed with a configurable frequency
➤ CREATE DUPLICATED TABLE statement automatically creates the master table,
materialized views, and other objects required for materialized view replication.
SHARDING AND REPLICATION
➤ Managing by using GDSCTL
➤ Automatically deploys
➤ Data Guard
➤ Goldengate
//System-Managed Sharding with Data Guard Replication
CREATE SHARDCATALOG –database host00:1521:shardcat –region dc1, dc2
ADD SHARDGROUP -shardgroup shardgroup1 -region dc1 -deploy_as primary
ADD SHARDGROUP -shardgroup shardgroup2 -region dc1 -deploy_as standby
ADD SHARDGROUP -shardgroup shardgroup3 -region dc2 -deploy_as standby
CREATE SHARD …
DEPLOY
Database “DB1”
Shard “S1”
User_ID User_Name
1 Kim
3 Jim
Shard “S2”
User_ID User_Name
2 Tim
4 Sim
Database “DB2”
Table “T”
Shardgroup 1
Database “DB1”
Shard “S1”
User_ID User_Name
1 Kim
3 Jim
Shard “S2”
User_ID User_Name
2 Tim
4 Sim
Database “DB2”
Table “T”
Shardgroup 2
Database “DB1”
Shard “S1”
User_ID User_Name
1 Kim
3 Jim
Shard “S2”
User_ID User_Name
2 Tim
4 Sim
Database “DB2”
Table “T”
Shardgroup 3
DC 1
DC 2
//System-Managed Sharding with Goldengate Replication
CREATE SHARDCATALOG -repl OGG –database host00:1521:shardcat –region dc1, dc2
ADD SHARDGROUP -shardgroup shardgroup1 -region dc1
ADD SHARDGROUP -shardgroup shardgroup2 -region dc2
CREATE SHARD …
DEPLOY
SHARDING REQUEST ROUTING
➤ Session-Based Request Routing
➤ Connect string must contain: (SHARD_KEY=...)
➤ JDBC: connection.setShardKey(<shard_key>,<shard_group_key>);
➤ Support for OCI/OCCI (C++)/ODP.NET
➤ Support for PHP, Python, Perl, and Node.js
➤ In addition to Session-Based routing, Oracle also provide support for:
➤ Statement-Level Request Routing
➤ Cross-Shard Queries
“Unlike NoSQL data stores, Oracle Sharding provides the benefits of sharding
without sacrificing the capabilities of an enterprise RDBMS, such as relational
schema, SQL and other programmatic interfaces, complex data types, online
schema changes, multi- core scalability, advanced security, compression, high-
availability, ACID properties, consistent reads, and many more..
-Oracle® Database Administrator's Guide 12c Release 2 (12.2)
THINK TWICE BEFORE JUMPING INTO SHARDING
➤ MySQL: Not exceed 20GB per table is optimised. (Concurrent processing capacity)
➤ How about we have a 2TB table? 100 shards!
➤ What does 100 shards mean?
➤ 100 x86 servers
➤ 1 Primary, 1 Slave -> 200 servers
➤ 1 Primary, 2 Slaves -> 300 servers
➤ How many routers do you need? How many cables? How many spaces?
➤ Are you ready for maintaining so many servers?
➤ 99% server stableness means: Server down/EVERY day.
LAST CONCERN
➤ License cost
➤ Oracle database license model has to be changed
32 CPU,$1,152,000/Y
32 CPU,$1,958,400/Y

More Related Content

What's hot

An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)Marco Gralike
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insightsKirill Loifman
 
REST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTREST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTChristian Gohmann
 
Oracle Database 12c "New features"
Oracle Database 12c "New features" Oracle Database 12c "New features"
Oracle Database 12c "New features" Anar Godjaev
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)Gustavo Rene Antunez
 
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2Markus Flechtner
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecturenaderattia
 
Connecting Hadoop and Oracle
Connecting Hadoop and OracleConnecting Hadoop and Oracle
Connecting Hadoop and OracleTanel Poder
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesGustavo Rene Antunez
 
Time for Change: Migrate your Non-RAC Database to RAC
Time for Change: Migrate your Non-RAC Database to RACTime for Change: Migrate your Non-RAC Database to RAC
Time for Change: Migrate your Non-RAC Database to RACSatishbabu Gunukula
 
Install oracle binaris or clonse oracle home
Install oracle binaris or clonse oracle homeInstall oracle binaris or clonse oracle home
Install oracle binaris or clonse oracle homeSatishbabu Gunukula
 
Ordina Oracle Open World
Ordina Oracle Open WorldOrdina Oracle Open World
Ordina Oracle Open WorldMarco Gralike
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESLudovico Caldara
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and ArchitectureSidney Chen
 
Crating a Robust Performance Strategy
Crating a Robust Performance StrategyCrating a Robust Performance Strategy
Crating a Robust Performance StrategyGuatemala User Group
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudipasalapudi123
 
Optimizing your Database Import!
Optimizing your Database Import! Optimizing your Database Import!
Optimizing your Database Import! Nabil Nawaz
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new featuresRemote DBA Services
 

What's hot (20)

An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insights
 
REST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTREST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using REST
 
Oracle Database 12c "New features"
Oracle Database 12c "New features" Oracle Database 12c "New features"
Oracle Database 12c "New features"
 
Oracle 12c Architecture
Oracle 12c ArchitectureOracle 12c Architecture
Oracle 12c Architecture
 
Oracle 12c - Multitenant Feature
Oracle 12c - Multitenant FeatureOracle 12c - Multitenant Feature
Oracle 12c - Multitenant Feature
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)
 
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecture
 
Connecting Hadoop and Oracle
Connecting Hadoop and OracleConnecting Hadoop and Oracle
Connecting Hadoop and Oracle
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
 
Time for Change: Migrate your Non-RAC Database to RAC
Time for Change: Migrate your Non-RAC Database to RACTime for Change: Migrate your Non-RAC Database to RAC
Time for Change: Migrate your Non-RAC Database to RAC
 
Install oracle binaris or clonse oracle home
Install oracle binaris or clonse oracle homeInstall oracle binaris or clonse oracle home
Install oracle binaris or clonse oracle home
 
Ordina Oracle Open World
Ordina Oracle Open WorldOrdina Oracle Open World
Ordina Oracle Open World
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
 
Crating a Robust Performance Strategy
Crating a Robust Performance StrategyCrating a Robust Performance Strategy
Crating a Robust Performance Strategy
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudi
 
Optimizing your Database Import!
Optimizing your Database Import! Optimizing your Database Import!
Optimizing your Database Import!
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 

Viewers also liked

Should I move my database to the cloud?
Should I move my database to the cloud?Should I move my database to the cloud?
Should I move my database to the cloud?James Serra
 
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)Beat Signer
 
CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)Dilawar Khan
 
Distributed database system
Distributed database systemDistributed database system
Distributed database systemM. Ahmad Mahmood
 
Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)Julien SIMON
 
Multi-model database
Multi-model databaseMulti-model database
Multi-model databaseJiaheng Lu
 
How to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseHow to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseSpeedment, Inc.
 
What's new with Azure Sql Database
What's new with Azure Sql DatabaseWhat's new with Azure Sql Database
What's new with Azure Sql DatabaseMarco Parenzan
 
Functional Database Strategies at Scala Bay
Functional Database Strategies at Scala BayFunctional Database Strategies at Scala Bay
Functional Database Strategies at Scala BayJason Swartz
 
Database concurrency control &amp; recovery (1)
Database concurrency control &amp; recovery (1)Database concurrency control &amp; recovery (1)
Database concurrency control &amp; recovery (1)Rashid Khan
 
PL/CUDA - GPU Accelerated In-Database Analytics
PL/CUDA - GPU Accelerated In-Database AnalyticsPL/CUDA - GPU Accelerated In-Database Analytics
PL/CUDA - GPU Accelerated In-Database AnalyticsKohei KaiGai
 
A noETL Parallel Streaming Transformation Loader using Spark, Kafka­ & Ver­tica
A noETL Parallel Streaming Transformation Loader using Spark, Kafka­ & Ver­ticaA noETL Parallel Streaming Transformation Loader using Spark, Kafka­ & Ver­tica
A noETL Parallel Streaming Transformation Loader using Spark, Kafka­ & Ver­ticaData Con LA
 
Business Intelligence and Multidimensional Database
Business Intelligence and Multidimensional DatabaseBusiness Intelligence and Multidimensional Database
Business Intelligence and Multidimensional DatabaseRussel Chowdhury
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new featuresJakkrapat S.
 
Oracle RAC 12c Release 2 - Overview
Oracle RAC 12c Release 2 - OverviewOracle RAC 12c Release 2 - Overview
Oracle RAC 12c Release 2 - OverviewMarkus Michalewicz
 
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...CUBRID
 
Oracle Database | Computer Science
Oracle Database | Computer ScienceOracle Database | Computer Science
Oracle Database | Computer ScienceTransweb Global Inc
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Alex Zaballa
 
Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Ludovico Caldara
 

Viewers also liked (20)

Mac & Oracle
Mac & OracleMac & Oracle
Mac & Oracle
 
Should I move my database to the cloud?
Should I move my database to the cloud?Should I move my database to the cloud?
Should I move my database to the cloud?
 
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
 
CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)
 
Distributed database system
Distributed database systemDistributed database system
Distributed database system
 
Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)
 
Multi-model database
Multi-model databaseMulti-model database
Multi-model database
 
How to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseHow to generate customized java 8 code from your database
How to generate customized java 8 code from your database
 
What's new with Azure Sql Database
What's new with Azure Sql DatabaseWhat's new with Azure Sql Database
What's new with Azure Sql Database
 
Functional Database Strategies at Scala Bay
Functional Database Strategies at Scala BayFunctional Database Strategies at Scala Bay
Functional Database Strategies at Scala Bay
 
Database concurrency control &amp; recovery (1)
Database concurrency control &amp; recovery (1)Database concurrency control &amp; recovery (1)
Database concurrency control &amp; recovery (1)
 
PL/CUDA - GPU Accelerated In-Database Analytics
PL/CUDA - GPU Accelerated In-Database AnalyticsPL/CUDA - GPU Accelerated In-Database Analytics
PL/CUDA - GPU Accelerated In-Database Analytics
 
A noETL Parallel Streaming Transformation Loader using Spark, Kafka­ & Ver­tica
A noETL Parallel Streaming Transformation Loader using Spark, Kafka­ & Ver­ticaA noETL Parallel Streaming Transformation Loader using Spark, Kafka­ & Ver­tica
A noETL Parallel Streaming Transformation Loader using Spark, Kafka­ & Ver­tica
 
Business Intelligence and Multidimensional Database
Business Intelligence and Multidimensional DatabaseBusiness Intelligence and Multidimensional Database
Business Intelligence and Multidimensional Database
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 
Oracle RAC 12c Release 2 - Overview
Oracle RAC 12c Release 2 - OverviewOracle RAC 12c Release 2 - Overview
Oracle RAC 12c Release 2 - Overview
 
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...
 
Oracle Database | Computer Science
Oracle Database | Computer ScienceOracle Database | Computer Science
Oracle Database | Computer Science
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
 
Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?
 

Similar to Oracle 12.2 sharded database management

A DBA’s guide to using TSA
A DBA’s guide to using TSAA DBA’s guide to using TSA
A DBA’s guide to using TSAFrederik Engelen
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAiougVizagChapter
 
When is MyRocks good?
When is MyRocks good? When is MyRocks good?
When is MyRocks good? Alkin Tezuysal
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseAltinity Ltd
 
CFCamp 2016 - Couchbase Overview
CFCamp 2016 - Couchbase OverviewCFCamp 2016 - Couchbase Overview
CFCamp 2016 - Couchbase OverviewAaron Benton
 
Best Practices for Migrating Your Data Warehouse to Amazon Redshift
Best Practices for Migrating Your Data Warehouse to Amazon RedshiftBest Practices for Migrating Your Data Warehouse to Amazon Redshift
Best Practices for Migrating Your Data Warehouse to Amazon RedshiftAmazon Web Services
 
iceberg introduction.pptx
iceberg introduction.pptxiceberg introduction.pptx
iceberg introduction.pptxDori Waldman
 
Operating and Supporting Delta Lake in Production
Operating and Supporting Delta Lake in ProductionOperating and Supporting Delta Lake in Production
Operating and Supporting Delta Lake in ProductionDatabricks
 
Migrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at FacebookMigrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at FacebookMariaDB plc
 
2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation2008 Collaborate IOUG Presentation
2008 Collaborate IOUG PresentationBiju Thomas
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseuzzal basak
 
Drupal MySQL Cluster
Drupal MySQL ClusterDrupal MySQL Cluster
Drupal MySQL ClusterKris Buytaert
 
Riak add presentation
Riak add presentationRiak add presentation
Riak add presentationIlya Bogunov
 

Similar to Oracle 12.2 sharded database management (20)

A DBA’s guide to using TSA
A DBA’s guide to using TSAA DBA’s guide to using TSA
A DBA’s guide to using TSA
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 
When is MyRocks good?
When is MyRocks good? When is MyRocks good?
When is MyRocks good?
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouse
 
CFCamp 2016 - Couchbase Overview
CFCamp 2016 - Couchbase OverviewCFCamp 2016 - Couchbase Overview
CFCamp 2016 - Couchbase Overview
 
Best Practices for Migrating Your Data Warehouse to Amazon Redshift
Best Practices for Migrating Your Data Warehouse to Amazon RedshiftBest Practices for Migrating Your Data Warehouse to Amazon Redshift
Best Practices for Migrating Your Data Warehouse to Amazon Redshift
 
iceberg introduction.pptx
iceberg introduction.pptxiceberg introduction.pptx
iceberg introduction.pptx
 
Presentation day4 oracle12c
Presentation day4 oracle12cPresentation day4 oracle12c
Presentation day4 oracle12c
 
Operating and Supporting Delta Lake in Production
Operating and Supporting Delta Lake in ProductionOperating and Supporting Delta Lake in Production
Operating and Supporting Delta Lake in Production
 
Migrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at FacebookMigrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at Facebook
 
FAQ
FAQFAQ
FAQ
 
Convert single instance to RAC
Convert single instance to RACConvert single instance to RAC
Convert single instance to RAC
 
2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby database
 
Spark streaming
Spark streamingSpark streaming
Spark streaming
 
PostgreSQL Terminology
PostgreSQL TerminologyPostgreSQL Terminology
PostgreSQL Terminology
 
Drupal MySQL Cluster
Drupal MySQL ClusterDrupal MySQL Cluster
Drupal MySQL Cluster
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
 
Riak add presentation
Riak add presentationRiak add presentation
Riak add presentation
 
oracle dba
oracle dbaoracle dba
oracle dba
 

More from Leyi (Kamus) Zhang

More from Leyi (Kamus) Zhang (9)

Vim - Amazing Editor for DBAs
Vim - Amazing Editor for DBAsVim - Amazing Editor for DBAs
Vim - Amazing Editor for DBAs
 
Hanganalyze presentation
Hanganalyze presentationHanganalyze presentation
Hanganalyze presentation
 
Vldb Statistics Gathering Strategy
Vldb Statistics Gathering StrategyVldb Statistics Gathering Strategy
Vldb Statistics Gathering Strategy
 
Exadata
ExadataExadata
Exadata
 
Kamus silde for summit
Kamus silde for summitKamus silde for summit
Kamus silde for summit
 
Oracle Resource Manager
Oracle Resource ManagerOracle Resource Manager
Oracle Resource Manager
 
Understanding histogramppt.prn
Understanding histogramppt.prnUnderstanding histogramppt.prn
Understanding histogramppt.prn
 
数据库性能诊断的七种武器
数据库性能诊断的七种武器数据库性能诊断的七种武器
数据库性能诊断的七种武器
 
DTCC Rac Load Balancing Failover
DTCC Rac Load Balancing FailoverDTCC Rac Load Balancing Failover
DTCC Rac Load Balancing Failover
 

Recently uploaded

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Oracle 12.2 sharded database management

  • 1. NEED SHARDING? HERE IT IS! Oracle 12.2 Sharded Database Management
  • 2. ABOUT ME ➤ Kamus@Enmotech 张乐奕 ➤ Travel and Starbucks ➤ Travel: Japan ➤ Starbucks: Venti Caramel Macchiato ➤ Games: Blizzard fans, Hearthstone ➤ Channel[K]: http://www.dbform.com
  • 3. WHATISSHARDING Every shard is a part of logical database
  • 4. WHAT IS SHARDING EXACTLY //Query single row select User_Name from T1 where User_ID=1; //Query all create view T as select * from T1 union all select * from T2; select count(*) from T; Database “DB” Database “DB” Split Table Table “T” User_ID User_Name 1 Kim 2 Tim 3 Jim 4 Sim Table “T1” User_ID User_Name 1 Kim 3 Jim Table “T2” User_ID User_Name 2 Tim 4 Sim
  • 5. WHAT IS SHARDING EXACTLY //Query single row select User_Name from T where User_ID=1; //Query all select count(*) from T; Database “DB” Database “DB” Partition Table Table “T” User_ID User_Name 1 Kim 2 Tim 3 Jim 4 Sim Partition “P1” User_ID User_Name 1 Kim 3 Jim Partition“P2” User_ID User_Name 2 Tim 4 Sim Table “T”
  • 6. WHAT IS SHARDING EXACTLY //Query single row select User_Name from T where User_ID=1; //Query all select count(*) from T; Database “DB” Database “DB1” Shard Table Table “T” User_ID User_Name 1 Kim 2 Tim 3 Jim 4 Sim Shard “S1” User_ID User_Name 1 Kim 3 Jim Shard “S2” User_ID User_Name 2 Tim 4 Sim Database “DB2” Table “T”
  • 7. WHY NEED SHARDING? BENEFITS OF SHARDING ➤ Extreme Scalability ➤ Scale Out vs. Scale Up ➤ Fault Isolation ➤ No shared SAN ➤ Global Data Distribution ➤ Store particular data close to its consumers ➤ Pilot & Rolling Upgrades ➤ First test the changes on a small subset of data. ➤ Cost Down ➤ Because the size of a shard can be made arbitrarily small, deploying an SDB in a cloud consisting of low-end commodity servers with local storage becomes easy. 

  • 8. DATABASE SPLITTING HISTORY IN WEB COMPANIES ➤ All business on Single database ➤ All business on Master+Slave databases, write/read separated. ➤ Business separated, each business on separated Master+Slave databases. ➤ Area based/Hash based, table horizontal split, each part of business on separated Master+Slave databases. Database “DB” Write Read Master Database “DB1” Write Slave Database “DB2” Read Replication Master Database “DB1-1” Write Slave Database “DB1-2” Read Replication Master Database “DBN-1” Write Slave Database “DBN-2” Read Replication Master Database “DB1-1” Write Slave Database “DB1-2” Read Replication Master Database “DB1-1” Write Slave Database “DB1-2” Read Replication Master Database “DB1-1” Write Slave Database “DB1-2” Read Replication Master Database “DBN-1” Write Slave Database “DBN-2” Read Replication Master Database “DBN-1” Write Slave Database “DBN-2” Read Replication Master Database “DBN-1” Write Slave Database “DBN-2” Read Replication
  • 9. DISADVANTAGES OF SHARDING ➤ Is it transparent to application developer? ➤ Which database should access? ➤ How to sum query all databases? ➤ How to join query all databases? Database access layer/Data access route layer ➤ Proxy-Free:MySQL Fabric, TDDL ➤ Proxy:MySQL Proxy, Atlas(Qihoo),Cobar } ➤ Single point of failure ➤ Failover more complex ➤ Backups more complex ➤ Modification more complex
  • 10. HOW MANY SHARDING SOLUTIONS? ➤ SQL ➤ MySQL with MySQL Fabric ➤ Postgres-XC and Greenplum ➤ Teradata ➤ No-SQL ➤ Apache HBase ➤ MongoDB ➤ New-SQL ➤ Google Spanner And NOW is coming!
  • 11. WHAT IS ORACLE SHARDING Every shard is a part of logical database
  • 12. GLOBAL DATA SERVICE - GDS ➤ What is GDS ➤ Instance->Service->Global Service ➤ GDS Capabilities ➤ Workload routing(region-based or lag-based) ➤ Load balancing(Connect-time or Run-time) ➤ Global service failover/role-based failover ➤ Released in Oracle database 12.1 ➤ GSM(Global Service Manager) ➤ GDS Catalog ➤ Must reside in Oracle database 12c ➤ Recommended to co-hosted with RMAN catalog or OEM repository
  • 13. GDS DEPLOYMENT OVERVIEW ➤ Install GSM software on GSM servers ➤ Minimum 1 GSM per region ➤ Recommended 3 GSMs/region ➤ Setup GDS administrator accounts & privileges ➤ Configure GDS ➤ Create GDS catalog ➤ Add GSMs,Regions, Pools, Databases, Global Services ➤ Setup client connectivity ➤ Clients connect to GSM instead of the database listener
  • 14. GDS USE CASES - ROLE BASED GLOBAL SERVICES FOR ACTIVE DATA GUARD ➤ Order Service runs on Primary ➤ Reporting Service runs on Standby ➤ Upon Data Guard role change, GDS fails over services based on Role GDSCTL> add service -service order_srvc -gdspool sales - preferred_all -role PRIMAY; GDSCTL> add service -service reporting_srvc -gdspool sales -preferred_all -role PHYSICAL_STANBY -failover_primay;
  • 15. GDS USE CASES - REPLICATION LAG TOLERANCE IN ACTIVE DATA GUARD ➤ Specify replication lag limit for a service ➤ GDS ensures that service runs on Active Data Guard standby(s) with lag less than this limit ➤ Improved data quality GDSCTL> add service -service reporting_srvc -gdspool sales –preferred_all –role PHYSICAL_STANDBY –lag 180;
  • 16. ORACLE SHARDING USE CASE Oracle Sharding is implemented based on the Oracle Database partitioning feature. Oracle Sharding is “Distribute Partitioning”.
  • 17. ORACLE SHARDING KNOWHOW ➤ Table family ➤ Parent-child relationship tables ➤ In Oracle Database 12c Release 2, only a single table family is supported in an SDB Sharding Key
  • 18. ORACLE SHARDING KNOWHOW ➤ Consistent Hash ➤ Traditional hash: bucket number is calculated as HF(key) % N ➤ Oracle linear hashing: buckets number is power of 2, if not, data is not even. ➤ Consistent hashing: partitioning by the range of hash values ➤ When add/remove shards, only move chunks, does not change contents of chunks ➤ When chunk is split, hash values divide into 2 ranges, other chunks no infect
  • 19. ORACLE SHARDING KNOWHOW ➤ Tablespace set ➤ Before creating a sharded table partitioned by consistent hash, a set of tablespaces (one tablespace per chunk) has to be created to store the table partitions. ➤ Chunk ➤ A chunk contains a single partition from each table of a table family ➤ Default, 120 chunks per shard, or specified when CREATE SHARDCATALOG by using GDSCTL ➤ The unit of data migration between shards is the chunk. Customers_P1(1-1000000) Orders_P1 Lineitems_P1Chunk #1
  • 20. ORACLE SHARDING KNOWHOW ➤ Duplicated table ➤ Synchronizes the contents of duplicated tables using Materialized View Replication ➤ A duplicated table on each shard is represented by a read-only materialized view. ➤ Automatically refreshed with a configurable frequency ➤ CREATE DUPLICATED TABLE statement automatically creates the master table, materialized views, and other objects required for materialized view replication.
  • 21. SHARDING AND REPLICATION ➤ Managing by using GDSCTL ➤ Automatically deploys ➤ Data Guard ➤ Goldengate //System-Managed Sharding with Data Guard Replication CREATE SHARDCATALOG –database host00:1521:shardcat –region dc1, dc2 ADD SHARDGROUP -shardgroup shardgroup1 -region dc1 -deploy_as primary ADD SHARDGROUP -shardgroup shardgroup2 -region dc1 -deploy_as standby ADD SHARDGROUP -shardgroup shardgroup3 -region dc2 -deploy_as standby CREATE SHARD … DEPLOY Database “DB1” Shard “S1” User_ID User_Name 1 Kim 3 Jim Shard “S2” User_ID User_Name 2 Tim 4 Sim Database “DB2” Table “T” Shardgroup 1 Database “DB1” Shard “S1” User_ID User_Name 1 Kim 3 Jim Shard “S2” User_ID User_Name 2 Tim 4 Sim Database “DB2” Table “T” Shardgroup 2 Database “DB1” Shard “S1” User_ID User_Name 1 Kim 3 Jim Shard “S2” User_ID User_Name 2 Tim 4 Sim Database “DB2” Table “T” Shardgroup 3 DC 1 DC 2 //System-Managed Sharding with Goldengate Replication CREATE SHARDCATALOG -repl OGG –database host00:1521:shardcat –region dc1, dc2 ADD SHARDGROUP -shardgroup shardgroup1 -region dc1 ADD SHARDGROUP -shardgroup shardgroup2 -region dc2 CREATE SHARD … DEPLOY
  • 22. SHARDING REQUEST ROUTING ➤ Session-Based Request Routing ➤ Connect string must contain: (SHARD_KEY=...) ➤ JDBC: connection.setShardKey(<shard_key>,<shard_group_key>); ➤ Support for OCI/OCCI (C++)/ODP.NET ➤ Support for PHP, Python, Perl, and Node.js ➤ In addition to Session-Based routing, Oracle also provide support for: ➤ Statement-Level Request Routing ➤ Cross-Shard Queries
  • 23. “Unlike NoSQL data stores, Oracle Sharding provides the benefits of sharding without sacrificing the capabilities of an enterprise RDBMS, such as relational schema, SQL and other programmatic interfaces, complex data types, online schema changes, multi- core scalability, advanced security, compression, high- availability, ACID properties, consistent reads, and many more.. -Oracle® Database Administrator's Guide 12c Release 2 (12.2)
  • 24. THINK TWICE BEFORE JUMPING INTO SHARDING ➤ MySQL: Not exceed 20GB per table is optimised. (Concurrent processing capacity) ➤ How about we have a 2TB table? 100 shards! ➤ What does 100 shards mean? ➤ 100 x86 servers ➤ 1 Primary, 1 Slave -> 200 servers ➤ 1 Primary, 2 Slaves -> 300 servers ➤ How many routers do you need? How many cables? How many spaces? ➤ Are you ready for maintaining so many servers? ➤ 99% server stableness means: Server down/EVERY day.
  • 25. LAST CONCERN ➤ License cost ➤ Oracle database license model has to be changed 32 CPU,$1,152,000/Y 32 CPU,$1,958,400/Y