Sharding Advisor Usage and Options
Syntax
gwsadv
[-n nodeName[:portnum]]
[-s serviceName]
-u username
-p password
[-c]
[-awr_snap_begin timestamp]
[-awr_snap_end timestamp]
–w
[sch=(schema1, schema2, …)]
[-tab importantTabsFile]
[-pr numpreds:n]
[-t trace_file]
Options
Note that each option must be prefixed with a minus sign (-) except for the
sch
argument.
Option | Description | Required (Y/N) |
---|---|---|
-awr_snap_begin timestamp |
Specify the beginning timestamp, in the format 'YYYY-MM-DD HH24:MI:SS', to specify the AWR snapshots to capture the workload from. |
N |
-awr_snap_end timestamp |
Specify the end timestamp, in the format 'YYYY-MM-DD HH24:MI:SS', to specify the AWR snapshots to capture the workload from. |
N |
-c |
Capture a new or changed workload. Use Required on first run of Sharding Advisor on a new or changed workload. Not required on subsequent runs on the same workload. By default, the workload is captured from the
Alternatively, the workload can be captured from
Automatic Workload Repository (AWR) snapshots by using the
|
N |
-n nodeName[:portnum] |
Node name and port number, if connecting to a database on another host |
N |
-p password |
Oracle password |
Y |
-pr
numpreds:n |
Limits the number of predicates to be captured when using
|
N |
-s serviceName |
Service name, if connecting to a database on another host |
N |
sch |
The |
N |
-t
trace_file |
Enables tracing of all activities performed by sharding advisor. Specify an output file name. |
N |
-tab importantTabsFile |
Name of file that consists of table names, one per line, in the format schemaname.tablename, to restrict the number of tables that the Sharding Advisor needs to analyze. |
N |
-u
username |
Oracle user name |
Y |
-w |
Directs Sharding Advisor to use the query workload for sharding configuration generation and ranking. |
Y |
Usage Notes
The normal usage of the sharding advisor is to not specify the –pr
option. The query workload capture should be faster now even without the
–pr
option. If however, the you want to speed it up further,
the –pr
option can be used. If it is used, it has to be used in
conjunction with the –c
option. If unspecified, the number of
predicates to be captured is not limited.
For procedures describing how to run the Sharding Advisor with example commands see Run Sharding Advisor and Run Sharding Advisor on a Non-Production System.