2015-12-23 23:33:34 +08:00
|
|
|
SET client_min_messages TO error;
|
|
|
|
\set VERBOSITY default
|
|
|
|
|
|
|
|
\i test/overviews/fixtures.sql
|
2018-09-05 00:17:04 +08:00
|
|
|
vacuum ANALYZE; -- Make sure there are metrics for ST_EstimatedExtent
|
2015-12-23 23:33:34 +08:00
|
|
|
|
|
|
|
SELECT _CDB_Aggregable_Attributes_Expression('base_bare_t'::regclass);
|
|
|
|
SELECT _CDB_Aggregated_Attributes_Expression('base_bare_t'::regclass);
|
|
|
|
SELECT _CDB_Aggregated_Attributes_Expression('base_bare_t'::regclass, 'tab');
|
|
|
|
|
|
|
|
SELECT CDB_CreateOverviews('base_bare_t'::regclass);
|
2016-04-05 01:21:10 +08:00
|
|
|
SELECT count(*) FROM _vovw_2_base_bare_t;
|
2016-01-12 22:36:07 +08:00
|
|
|
|
2015-12-23 23:33:34 +08:00
|
|
|
|
|
|
|
SELECT _CDB_Aggregable_Attributes_Expression('base_t'::regclass);
|
|
|
|
SELECT _CDB_Aggregated_Attributes_Expression('base_t'::regclass);
|
|
|
|
SELECT _CDB_Aggregated_Attributes_Expression('base_t'::regclass, 'tab');
|
|
|
|
|
|
|
|
SELECT CDB_CreateOverviews('base_t'::regclass);
|
2016-04-05 01:21:10 +08:00
|
|
|
SELECT count(*) FROM _vovw_2_base_t;
|
2016-01-12 22:36:07 +08:00
|
|
|
|
2016-01-29 23:19:35 +08:00
|
|
|
SELECT CDB_CreateOverviews('polyg_t'::regclass);
|
|
|
|
|
2016-03-21 19:27:00 +08:00
|
|
|
SELECT CDB_CreateOverviews('column_types_t'::regclass);
|
|
|
|
|
2016-01-26 17:39:26 +08:00
|
|
|
SELECT CDB_Overviews('base_t'::regclass);
|
2016-04-04 23:02:59 +08:00
|
|
|
SELECT CDB_Overviews('"public"."base_t"'::regclass);
|
2016-01-26 17:39:26 +08:00
|
|
|
SELECT CDB_Overviews(ARRAY['base_t'::regclass, 'base_bare_t'::regclass]);
|
2016-01-29 23:19:35 +08:00
|
|
|
SELECT CDB_Overviews('polyg_t'::regclass);
|
2016-03-18 02:27:51 +08:00
|
|
|
SELECT CDB_Overviews('column_types_t'::regclass);
|
2016-01-26 17:39:26 +08:00
|
|
|
|
2016-03-18 02:27:51 +08:00
|
|
|
SELECT CDB_DropOverviews('column_types_t'::regclass);
|
2016-01-12 22:36:07 +08:00
|
|
|
SELECT CDB_DropOverviews('base_bare_t'::regclass);
|
|
|
|
SELECT CDB_DropOverviews('base_t'::regclass);
|
2016-04-05 01:21:10 +08:00
|
|
|
SELECT count(*) FROM _vovw_2_base_t;
|
|
|
|
|
|
|
|
SELECT CDB_CreateOverviewsWithToleranceInPixels('base_t'::regclass, 7.5);
|
|
|
|
SELECT count(*) FROM _vovw_2_base_t;
|
|
|
|
SELECT CDB_DropOverviews('base_t'::regclass);
|
2015-12-23 23:33:34 +08:00
|
|
|
|
2016-03-18 02:27:51 +08:00
|
|
|
DROP TABLE column_types_t;
|
2015-12-23 23:33:34 +08:00
|
|
|
DROP TABLE base_bare_t;
|
|
|
|
DROP TABLE base_t;
|
2016-01-29 23:19:35 +08:00
|
|
|
DROP TABLE polyg_t;
|