提交 37c75753 编写于 作者: A Ashwin Agrawal

Perform analyze on specific table in spilltodisk test.

No need to have database scope analyze, only specific table needs to be
analyzed for the test.
上级 db53d8cf
......@@ -31,8 +31,7 @@ create table spilltest (a integer, b integer);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' 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.
insert into spilltest select a, a%25 from generate_series(1,8000) a;
analyze;
NOTICE: ANALYZE detected all empty sample pages for table pg_auth_members, please run VACUUM FULL for accurate estimation.
analyze spilltest;
set enable_hashagg=on;
set enable_groupagg=off;
set statement_mem=10000;
......@@ -102,8 +101,7 @@ create table spilltest (a integer, b integer);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' 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.
insert into spilltest select a, a%25 from generate_series(1,800000) a;
analyze; -- We have to do an analyze to force a hash join
NOTICE: ANALYZE detected all empty sample pages for table pg_auth_members, please run VACUUM FULL for accurate estimation.
analyze spilltest; -- We have to do an analyze to force a hash join
set enable_mergejoin=off;
set enable_nestloop=off;
set enable_hashjoin=on;
......
......@@ -22,7 +22,7 @@ select count(*), sum(t1a), sum(t2a), sum(t1a - t2a) from spilltestresult1;
-- Test Hash Aggregation when the work mem is too small for the hash table
create table spilltest (a integer, b integer);
insert into spilltest select a, a%25 from generate_series(1,8000) a;
analyze;
analyze spilltest;
set enable_hashagg=on;
set enable_groupagg=off;
set statement_mem=10000;
......@@ -34,7 +34,7 @@ select b,count(*) from spilltest group by b;
drop table if exists spilltest;
create table spilltest (a integer, b integer);
insert into spilltest select a, a%25 from generate_series(1,800000) a;
analyze; -- We have to do an analyze to force a hash join
analyze spilltest; -- We have to do an analyze to force a hash join
set enable_mergejoin=off;
set enable_nestloop=off;
set enable_hashjoin=on;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册