提交 4debd98c 编写于 作者: H Heikki Linnakangas

Move mpp25537 test from TINC to main test suite.

上级 c98a538c
......@@ -2917,3 +2917,85 @@ drop table if exists t;
drop table if exists x_non_part;
drop table if exists x_part;
drop function my_equality(int, int);
-- Bug-fix verification for MPP-25537: PANIC when bitmap index used in ORCA select
CREATE TABLE mpp25537_facttable1 (
col1 integer,
wk_id smallint,
id integer
)
with (appendonly=true, orientation=column, compresstype=zlib, compresslevel=5)
partition by range (wk_id) (
start (1::smallint) END (20::smallint) inclusive every (1),
default partition dflt
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'col1' 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.
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_dflt" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_2" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_3" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_4" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_5" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_6" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_7" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_8" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_9" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_10" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_11" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_12" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_13" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_14" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_15" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_16" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_17" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_18" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_19" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_20" for table "mpp25537_facttable1"
insert into mpp25537_facttable1 select col1, col1, col1 from (select generate_series(1,20) col1)a;
CREATE TABLE mpp25537_dimdate (
wk_id smallint,
col2 date
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'wk_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.
insert into mpp25537_dimdate select col1, current_date - col1 from (select generate_series(1,20,2) col1)a;
CREATE TABLE mpp25537_dimtabl1 (
id integer,
col2 integer
);
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.
insert into mpp25537_dimtabl1 select col1, col1 from (select generate_series(1,20,3) col1)a;
CREATE INDEX idx_mpp25537_facttable1 on mpp25537_facttable1 (id);
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_dflt"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_2"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_3"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_4"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_5"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_6"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_7"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_8"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_9"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_10"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_11"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_12"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_13"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_14"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_15"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_16"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_17"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_18"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_19"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_20"
set optimizer_analyze_root_partition to on;
ANALYZE mpp25537_facttable1;
ANALYZE mpp25537_dimdate;
ANALYZE mpp25537_dimtabl1;
SELECT count(*)
FROM mpp25537_facttable1 ft, mpp25537_dimdate dt, mpp25537_dimtabl1 dt1
WHERE ft.wk_id = dt.wk_id
AND ft.id = dt1.id;
count
-------
4
(1 row)
......@@ -2917,3 +2917,85 @@ drop table if exists t;
drop table if exists x_non_part;
drop table if exists x_part;
drop function my_equality(int, int);
-- Bug-fix verification for MPP-25537: PANIC when bitmap index used in ORCA select
CREATE TABLE mpp25537_facttable1 (
col1 integer,
wk_id smallint,
id integer
)
with (appendonly=true, orientation=column, compresstype=zlib, compresslevel=5)
partition by range (wk_id) (
start (1::smallint) END (20::smallint) inclusive every (1),
default partition dflt
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'col1' 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.
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_dflt" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_2" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_3" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_4" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_5" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_6" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_7" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_8" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_9" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_10" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_11" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_12" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_13" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_14" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_15" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_16" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_17" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_18" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_19" for table "mpp25537_facttable1"
NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_20" for table "mpp25537_facttable1"
insert into mpp25537_facttable1 select col1, col1, col1 from (select generate_series(1,20) col1)a;
CREATE TABLE mpp25537_dimdate (
wk_id smallint,
col2 date
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'wk_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.
insert into mpp25537_dimdate select col1, current_date - col1 from (select generate_series(1,20,2) col1)a;
CREATE TABLE mpp25537_dimtabl1 (
id integer,
col2 integer
);
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.
insert into mpp25537_dimtabl1 select col1, col1 from (select generate_series(1,20,3) col1)a;
CREATE INDEX idx_mpp25537_facttable1 on mpp25537_facttable1 (id);
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_dflt"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_2"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_3"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_4"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_5"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_6"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_7"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_8"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_9"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_10"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_11"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_12"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_13"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_14"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_15"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_16"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_17"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_18"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_19"
NOTICE: building index for child partition "mpp25537_facttable1_1_prt_20"
set optimizer_analyze_root_partition to on;
ANALYZE mpp25537_facttable1;
ANALYZE mpp25537_dimdate;
ANALYZE mpp25537_dimtabl1;
SELECT count(*)
FROM mpp25537_facttable1 ft, mpp25537_dimdate dt, mpp25537_dimtabl1 dt1
WHERE ft.wk_id = dt.wk_id
AND ft.id = dt1.id;
count
-------
4
(1 row)
......@@ -114,3 +114,45 @@ drop table if exists t;
drop table if exists x_non_part;
drop table if exists x_part;
drop function my_equality(int, int);
-- Bug-fix verification for MPP-25537: PANIC when bitmap index used in ORCA select
CREATE TABLE mpp25537_facttable1 (
col1 integer,
wk_id smallint,
id integer
)
with (appendonly=true, orientation=column, compresstype=zlib, compresslevel=5)
partition by range (wk_id) (
start (1::smallint) END (20::smallint) inclusive every (1),
default partition dflt
);
insert into mpp25537_facttable1 select col1, col1, col1 from (select generate_series(1,20) col1) a;
CREATE TABLE mpp25537_dimdate (
wk_id smallint,
col2 date
);
insert into mpp25537_dimdate select col1, current_date - col1 from (select generate_series(1,20,2) col1) a;
CREATE TABLE mpp25537_dimtabl1 (
id integer,
col2 integer
);
insert into mpp25537_dimtabl1 select col1, col1 from (select generate_series(1,20,3) col1) a;
CREATE INDEX idx_mpp25537_facttable1 on mpp25537_facttable1 (id);
set optimizer_analyze_root_partition to on;
ANALYZE mpp25537_facttable1;
ANALYZE mpp25537_dimdate;
ANALYZE mpp25537_dimtabl1;
SELECT count(*)
FROM mpp25537_facttable1 ft, mpp25537_dimdate dt, mpp25537_dimtabl1 dt1
WHERE ft.wk_id = dt.wk_id
AND ft.id = dt1.id;
-- start_ignore
SET optimizer_log=on;
SET
SET optimizer_enable_indexjoin=on;
SET
SET optimizer=on;
SET
SET optimizer_log=on;
SET
-- end_ignore
-- @author gcaragea
-- @created 2015-05-08 18:00:00
-- @tags ORCA bfv
-- @gpopt 1.577
-- @description bfv for MPP-25537
--start_ignore
DROP TABLE IF EXISTS mpp25537_facttable1;
DROP TABLE
DROP TABLE IF EXISTS mpp25537_dimdate;
DROP TABLE
DROP TABLE IF EXISTS mpp25537_dimtabl1;
DROP TABLE
--end_ignore
CREATE TABLE mpp25537_facttable1 (
col1 integer,
wk_id smallint,
id integer
)
with (appendonly=true, orientation=column, compresstype=zlib, compresslevel=5)
partition by range (wk_id) (
start (1::smallint) END (20::smallint) inclusive every (1),
default partition dflt
)
;
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'col1' 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.
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_dflt" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_2" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_3" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_4" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_5" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_6" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_7" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_8" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_9" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_10" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_11" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_12" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_13" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_14" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_15" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_16" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_17" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_18" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_19" for table "mpp25537_facttable1"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:31: NOTICE: CREATE TABLE will create partition "mpp25537_facttable1_1_prt_20" for table "mpp25537_facttable1"
CREATE TABLE
insert into mpp25537_facttable1 select col1, col1, col1 from (select generate_series(1,20) col1)a;
INSERT 0 20
CREATE TABLE mpp25537_dimdate (
wk_id smallint,
col2 date
)
;
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:39: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'wk_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
insert into mpp25537_dimdate select col1, current_date - col1 from (select generate_series(1,20,2) col1)a;
INSERT 0 10
CREATE TABLE mpp25537_dimtabl1 (
id integer,
col2 integer
)
;
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:47: 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
insert into mpp25537_dimtabl1 select col1, col1 from (select generate_series(1,20,3) col1)a;
INSERT 0 7
CREATE INDEX idx_mpp25537_facttable1 on mpp25537_facttable1 (id);
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_dflt"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_2"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_3"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_4"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_5"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_6"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_7"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_8"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_9"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_10"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_11"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_12"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_13"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_14"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_15"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_16"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_17"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_18"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_19"
psql:/data/caragg/tincrepo/main/query/indexapply/output_bfv_other/mpp25537_orca.sql:51: NOTICE: building index for child partition "mpp25537_facttable1_1_prt_20"
CREATE INDEX
set optimizer_analyze_root_partition to on;
SET
set optimizer to on;
SET
ANALYZE mpp25537_facttable1;
ANALYZE
ANALYZE mpp25537_dimdate;
ANALYZE
ANALYZE mpp25537_dimtabl1;
ANALYZE
SELECT count(*)
FROM mpp25537_facttable1 ft, mpp25537_dimdate dt, mpp25537_dimtabl1 dt1
WHERE ft.wk_id = dt.wk_id
AND ft.id = dt1.id;
count
-------
4
(1 row)
-- @author gcaragea
-- @created 2015-05-08 18:00:00
-- @tags ORCA bfv
-- @gpopt 1.577
-- @description bfv for MPP-25537
--start_ignore
DROP TABLE IF EXISTS mpp25537_facttable1;
DROP TABLE IF EXISTS mpp25537_dimdate;
DROP TABLE IF EXISTS mpp25537_dimtabl1;
--end_ignore
CREATE TABLE mpp25537_facttable1 (
col1 integer,
wk_id smallint,
id integer
)
with (appendonly=true, orientation=column, compresstype=zlib, compresslevel=5)
partition by range (wk_id) (
start (1::smallint) END (20::smallint) inclusive every (1),
default partition dflt
)
;
insert into mpp25537_facttable1 select col1, col1, col1 from (select generate_series(1,20) col1)a;
CREATE TABLE mpp25537_dimdate (
wk_id smallint,
col2 date
)
;
insert into mpp25537_dimdate select col1, current_date - col1 from (select generate_series(1,20,2) col1)a;
CREATE TABLE mpp25537_dimtabl1 (
id integer,
col2 integer
)
;
insert into mpp25537_dimtabl1 select col1, col1 from (select generate_series(1,20,3) col1)a;
CREATE INDEX idx_mpp25537_facttable1 on mpp25537_facttable1 (id);
set optimizer_analyze_root_partition to on;
set optimizer to on;
ANALYZE mpp25537_facttable1;
ANALYZE mpp25537_dimdate;
ANALYZE mpp25537_dimtabl1;
SELECT count(*)
FROM mpp25537_facttable1 ft, mpp25537_dimdate dt, mpp25537_dimtabl1 dt1
WHERE ft.wk_id = dt.wk_id
AND ft.id = dt1.id;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册