詳細はData Sources Statisticsを参照してください。
SYSADMIN.gatherStatistics
このプロシージャは、特定のデータソースの統計情報を同期的に収集します。
SYSADMIN.gatherStatistics(<
IN
string datasource>, <
IN
boolean gatherTableCardinalities>, <
IN
boolean gatherColumnCardinalities>, <
IN
boolean gatherNetworkStats>, <
IN
string excludeTables> <
IN
boolean gatherForOnlyTablesWithoutStats>)
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | Description |
---|---|
| Name of the data source to gather statistics for |
| Whether or not the tables' statistics should be gathered |
| Whether or not the columns' statistics should be gathered |
| Whether the network statistics should be gathered |
| Tables to be excluded from the statistics gathering (regular expression) |
| If set to |
Example
CALL
"SYSADMIN.gatherStatistics"
(
"datasource"
=>
'postgres'
,
"gatherTableCardinalities"
=>
TRUE
,
"gatherColumnCardinalities"
=>
TRUE
,
"gatherNetworkStats"
=>
FALSE
,
"excludeTables"
=>
'table1'
,
"gatherForOnlyTablesWithoutStats"
=>
FALSE
);;
SYSADMIN.createGatherStatisticsJob
このプロシージャでは、特定のデータソースの統計を収集するジョブを作成します。
SYSADMIN.createGatherStatisticsJob(
IN
datasource string,
IN
gatherTableCardinalities boolean
NOT
NULL
,
IN
gatherColumnCardinalities boolean
NOT
NULL
,
IN
gatherNetworkStats boolean
NOT
NULL
,
IN
excludeTables string,
IN
boolean gatherForOnlyTablesWithoutStats,
IN
parallelRunsAllowed
integer
,
IN
retryCounter
integer
,
IN
retryDelay
integer
,
IN
jobName biginteger,
IN
uuid string )
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | Description |
---|---|
| Name of the data source to gather statistics for |
| Whether or not the tables' statistics should be gathered |
| Whether or not the columns' statistics should be gathered |
| Whether the network statistics should be gathered |
| Tables to be excluded from the statistics gathering (regular expression) |
| If set to |
| Number of parallel runs allowed |
| Number of retry attempts if the job fails |
| Delay in seconds between retry attempts |
| Job timeout in minutes |
| Name of job |
uuid | Custom uuid for the job |
Example
CALL
"SYSADMIN.createGatherStatisticsJob"
(
"datasource"
=>
'postgres'
,
"gatherTableCardinalities"
=>
TRUE
,
"gatherColumnCardinalities"
=>
TRUE
,
"gatherNetworkStats"
=>
FALSE
,
"excludeTables"
=>
'table1'
,
"gatherForOnlyTablesWithoutStats"
=>
FALSE
,
"parallelRunsAllowed"
=> 3,
"retryCounter"
=> 20,
"retryDelay"
=> 30,
"runTimeout"
=> 40,
"jobName"
=>
'string_jobName1'
,
"uuid"
=>
'79259976-63cb-11ee-8c99-0242ac120002'
);;
uuid
parameter is available since v4.1
SYSADMIN.deleteStatistics
このプロシージャは、特定のデータ ソースの統計を削除します。
SYSADMIN.deleteStatistics(<
IN
string elementName>)
Examples
1. 内部データベースからすべての統計をDELETEし、SYS.Tables
およびSYS.Columns
に表示されている現在の統計をすべてリセットします:
CALL SYSADMIN.deleteStatistics(
'*'
)
2. test_tables
スキーマに関連するすべてのテーブルとカラムの統計情報を削除します:
CALL SYSADMIN.deleteStatistics(
'test_tables'
)
3. test_tables.test_a
テーブルに関連するすべてのテーブルと列の統計情報を削除します:
CALL SYSADMIN.deleteStatistics(
'test_tables.test_a'
)
4. test_tables.test_a.
に関連する列統計のみを削除します:
CALL SYSADMIN.deleteStatistics(
'test_tables.test_a.a'
)
SYSADMIN.setColumnStats
このプロシージャは、指定された列の統計情報を設定します。
SYSADMIN.setColumnStats(
IN
tableName string
NOT
NULL
,
IN
columnName string
NOT
NULL
,
IN
distinctCount long,
IN
nullCount long cardinality,
IN
max
string,
IN
min
string)
すべての統計値はNULL可能です。NULL
stat値を渡すと、対応するメタデータの値は変更されません。
SYSADMIN.setTableStats
このプロシージャは、指定されたテーブルの統計情報を設定します。
SYSADMIN.setTableStats(
IN
tableName string
NOT
NULL
,
IN
cardinality long
NOT
NULL
)