About Sharding Advisor
The Sharding Advisor is a client-side, command-line tool that you run against any non-distributed, production, 10g or later release, Oracle Database that you are considering migrating to an Oracle Globally Distributed Database.
The Sharding Advisor analysis provides you with the information you need to design a schema that maximizes performance while reducing duplicated data in the new distributed database environment.
The following are benefits of using Sharding Advisor to aid you with schema design.
- Maximize query workload performance
- Minimize multi-shard operations requiring cross-shard joins
- Maximize parallelism for complex queries (spread query processing across all shards)
- Minimize the amount of duplicated data on each shard
The Sharding Advisor utility, GWSADV
, is installed with
Oracle Database as a standalone tool, and connects to your database using authenticated
OCI connections.
To get an understanding of your schema and other preferences, Sharding Advisor asks you questions as part of an interactive dialog.
Sharding Advisor then connects to the existing non-distributed database, also called the source, analyzes its schema and query workload, and produces a set of alternative designs for the distributed database, including recommendations for an effective sharding key, which tables to shard, and which tables to duplicate on all shards.
Sharding configurations are ranked in terms of query performance, with the ranking favoring configurations that maximize single and multi-shard queries that do not require cross-shard joins, while minimizing multi-shard queries that require cross-shard joins.
You choose the design that best fits your requirements. The designs are ranked by the advisor, so if you don't have specific preferences you can choose the highest ranked design by default.
Note:
There are restrictions to Sharding Advisor capabilities:The source database must be Oracle Database 10g or later release.
If you cannot run the Sharding Advisor against the live production database, you can run the Sharding Advisor on a different server that has the schema and workload imported from the production database.
Sharding Advisor discovers the table families based on primary
key-foreign key relationships. If the schema does not have any primary key-foreign
key constraints, sharding by PARENT
clause is recommended.
Currently, Sharding Advisor recommends only single-table family,
system-managed sharding (sharding by reference) configurations if the source
database has foreign key constraints; otherwise, Sharding Advisor recommends
sharding using the PARENT
clause.