|
_autostats_on_change_threshold.
context | user
vartype | string
source | configuration file
min_val |
max_val |
-[ RECORD 2 ]---------------------------------------------------------------------------------------------------------------------------------
name | gp_autostats_on_change_threshold
setting | 80000
unit |
category | Developer Options
short_desc | Threshold for number of tuples added to table by CTAS or Insert-to to trigger autostats in on_change mode. See gp_autostats_mode.
extra_desc |
context | user
vartype | integer
source | configuration file
min_val | 0
max_val | 2147483647
gtlions=# \pset x
Expanded display is off.
gtlions=# drop table test;
DROP TABLE
gtlions=# create table test ( id int, name varchar(200),age int);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
gtlions=# insert into test select generate_series(1,80000),generate_series(1,80000)||'-aaa-bbb',round(random()::numeric,2)*100 limit 20000;
INSERT 0 20000
gtlions=# select relname,relfilenode,relpages,reltuples,relhasindex,relnatts from pg_class where relname in ('test') order by relname;
relname | relfilenode | relpages | reltuples | relhasindex | relnatts
---------+-------------+----------+-----------+-------------+----------
test | 35889 | 0 | 0 | f | 3
(1 row)
gtlions=# select * from pg_stats where tablename='test';
schemaname | tablename | attname | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation
------------+-----------+---------+-----------+-----------+------------+------------------+-------------------+------------------+-------------
(0 rows)
gtlions=# select * from gp_toolkit.gp_stats_missing where smitable='test';
smischema | smitable | smisize | smicols | smirecs
-----------+----------+---------+---------+---------
public | test | f | 3 | 0
(1 row)
gtlions=# insert into test select generate_series(1,80000),generate_series(1,80000)||'-aaa-bbb',round(random()::numeric,2)*100 limit 20000;
INSERT 0 20000
gtlions=# select * from pg_stats where tablename='test';
schemaname | tablename | attname | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation
------------+-----------+---------+-----------+-----------+------------+------------------+-------------------+------------------+-------------
(0 rows)
gtlions=# insert into test select generate_series(1,80000),generate_series(1,80000)||'-aaa-bbb',round(random()::numeric,2)*100 limit 20000;
INSERT 0 20000
gtlions=# select * from pg_stats where tablename='test';
schemaname | tablename | attname | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation
------------+-----------+---------+-----------+-----------+------------+------------------+-------------------+------------------+-------------
(0 rows)
gtlions=# select count(*) from test;
count
-------
60000
(1 row)
gtlions=# insert into test select generate_series(1,80000),generate_series(1,80000)||'-aaa-bbb',round(random( |