Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
78d7d81d
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
78d7d81d
编写于
11月 08, 2017
作者:
D
David Yozie
提交者:
GitHub
11月 08, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
correcting range, defaults, and normalizing docs around default_statistics_target (#3819)
上级
bea6a32f
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
17 addition
and
17 deletion
+17
-17
gpdb-doc/dita/admin_guide/intro/about_statistics.xml
gpdb-doc/dita/admin_guide/intro/about_statistics.xml
+2
-2
gpdb-doc/dita/admin_guide/perf_issues.xml
gpdb-doc/dita/admin_guide/perf_issues.xml
+1
-1
gpdb-doc/dita/best_practices/analyze.xml
gpdb-doc/dita/best_practices/analyze.xml
+8
-8
gpdb-doc/dita/ref_guide/config_params/guc-list.xml
gpdb-doc/dita/ref_guide/config_params/guc-list.xml
+4
-4
gpdb-doc/dita/ref_guide/sql_commands/ALTER_TABLE.xml
gpdb-doc/dita/ref_guide/sql_commands/ALTER_TABLE.xml
+1
-1
gpdb-doc/dita/ref_guide/sql_commands/ANALYZE.xml
gpdb-doc/dita/ref_guide/sql_commands/ANALYZE.xml
+1
-1
未找到文件。
gpdb-doc/dita/admin_guide/intro/about_statistics.xml
浏览文件 @
78d7d81d
...
...
@@ -329,8 +329,8 @@
<codeph>
default_statistics_target
</codeph>
server configuration parameter. The default
value is usually sufficient, and you should only raise or lower it if your tests
demonstrate that query plans improve with the new target. For example, to raise the
default statistics target from
25 to
50 you can use the
<codeph>
gpconfig
</codeph>
utility:
<codeblock>
gpconfig -c default_statistics_target -v 50
</codeblock></p>
default statistics target from
100 to 1
50 you can use the
<codeph>
gpconfig
</codeph>
utility:
<codeblock>
gpconfig -c default_statistics_target -v
1
50
</codeblock></p>
<p>
The statististics target for individual columns can be set with the
<codeph>
ALTER
TABLE
</codeph>
command. For example, some queries can be improved by increasing the
target for certain columns, especially columns that have irregular distributions. You can
...
...
gpdb-doc/dita/admin_guide/perf_issues.xml
浏览文件 @
78d7d81d
...
...
@@ -135,7 +135,7 @@
<codeblock>
ALTER TABLE sales ALTER COLUMN region SET STATISTICS 50;
</codeblock>
</p>
<p>
This is equivalent to
increas
ing
<codeph>
default_statistics_target
</codeph>
for a
<p>
This is equivalent to
chang
ing
<codeph>
default_statistics_target
</codeph>
for a
particular column. Subsequent
<codeph>
ANALYZE
</codeph>
operations will then gather more
statistics data for that column and produce better query plans as a result.
</p>
</body>
...
...
gpdb-doc/dita/best_practices/analyze.xml
浏览文件 @
78d7d81d
...
...
@@ -35,14 +35,14 @@
quality, or accuracy, of the statistics.
</p>
<p>
To allow large tables to be analyzed in a reasonable amount of time,
<codeph>
ANALYZE
</codeph>
takes a random sample of the table contents, rather than
examining every row. To increase
sampling for all table columns adjust the
<codeph>
default_statistics_target
</codeph>
configuration parameter. The target value
ranges from 1 to 1000; the default target value is
25
. The
<codeph>
default_statistics_target
</codeph>
variable applies to all columns by default
. A
larger target value increases the time needed to perform the
<codeph>
ANALYZE
</codeph>
, bu
t
may improve the quality of the query planner’s estimates
. This is especially true for
columns with irregular data patterns.
<codeph>
default_statistics_target
</codeph>
can be set
at the
master/session level and requires a reload.
</p>
examining every row. To increase
the number of sample values for all table columns adjust
the
<codeph>
default_statistics_target
</codeph>
configuration parameter. The target value
ranges from 1 to 1000; the default target value is
100
. The
<codeph>
default_statistics_target
</codeph>
variable applies to all columns by default
, and
specifies the number of values that are stored in the list of common values. A larger targe
t
may improve the quality of the query planner’s estimates
, especially for columns with
irregular data patterns.
<codeph>
default_statistics_target
</codeph>
can be set at the
master/session level and requires a reload.
</p>
<p>
The
<codeph>
gp_analyze_relative_error
</codeph>
configuration parameter affects the sampling
rate during statistics collection to determine cardinality in a column. For example, a value
of .5 is equivalent to an acceptable error of 50%. The default is .25. Use the
...
...
gpdb-doc/dita/ref_guide/config_params/guc-list.xml
浏览文件 @
78d7d81d
...
...
@@ -1659,10 +1659,10 @@
<topic
id=
"default_statistics_target"
>
<title>
default_statistics_target
</title>
<body>
<p>
Sets the default statistics
target for table columns that have not had a column-specific
target set via
<codeph>
ALTER TABLE SET STATISTICS
</codeph>
. Larger values increase the time
needed to do
<codeph>
ANALYZE
</codeph>
, but may improve the quality of the legacy query
optimizer (planner) estimates.
</p>
<p>
Sets the default statistics
sampling target (the number of values that are stored in the
list of common values) for table columns that have not had a column-specific target set via
<codeph>
ALTER TABLE SET STATISTICS
</codeph>
. Larger values may improve the quality of the
legacy query optimizer (planner) estimates.
</p>
<table
id=
"default_statistics_target_table"
>
<tgroup
cols=
"3"
>
<colspec
colnum=
"1"
colname=
"col1"
colwidth=
"1*"
/>
...
...
gpdb-doc/dita/ref_guide/sql_commands/ALTER_TABLE.xml
浏览文件 @
78d7d81d
...
...
@@ -150,7 +150,7 @@ ALTER TABLE <varname>name</varname>
<li
id=
"ay136944"
><b>
SET STATISTICS
</b>
— Sets the per-column
statistics-gathering target for subsequent
<codeph>
ANALYZE
</codeph>
operations. The target can
be set in the range
0
to 1000, or set to -1 to revert to
be set in the range
1
to 1000, or set to -1 to revert to
using the system default statistics target
(
<codeph>
default_statistics_target
</codeph>
).
</li>
<li
id=
"ay137022"
><b>
ADD
<varname>
table_constraint
</varname></b>
—
...
...
gpdb-doc/dita/ref_guide/sql_commands/ANALYZE.xml
浏览文件 @
78d7d81d
...
...
@@ -157,7 +157,7 @@
column-by-column basis by setting the per-column statistics target with
<codeph>
ALTER TABLE
... ALTER COLUMN ... SET STATISTICS
</codeph>
(see
<codeph>
ALTER TABLE
</codeph>
). The
target value sets the maximum number of entries in the most-common-value list and the
maximum number of bins in the histogram. The default target value is 10, but this can be
maximum number of bins in the histogram. The default target value is 10
0
, but this can be
adjusted up or down to trade off accuracy of planner estimates against the time taken for
<codeph>
ANALYZE
</codeph>
and the amount of space occupied in
<codeph>
pg_statistic
</codeph>
. In particular, setting the statistics target to zero disables
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录