page212
298
nation_name VARCHAR(25),
region_name VARCHAR(25)
);
CREATE OR REPLACE TABLE part_customer_order_middle_east
(
customer_key NUMBER(38,0),
customer_name VARCHAR(25),
order_key NUMBER(38,0),
order_date DATE,
nation_name VARCHAR(25),
region_name VARCHAR(25)
);
Now create data for each segmented table from our base table,
base_
customer_order
.
USE WAREHOUSE IDENTIFIER ( $tpc_warehouse_m );
INSERT INTO part_customer_order_asia
SELECT *
FROM base_customer_order
WHERE region_name = 'ASIA';
INSERT INTO part_customer_order_europe
SELECT *
FROM base_customer_order
WHERE region_name = 'EUROPE';
INSERT INTO part_customer_order_africa
SELECT *
FROM base_customer_order
WHERE region_name = 'AFRICA';
INSERT INTO part_customer_order_america
SELECT *
FROM base_customer_order
WHERE region_name = 'AMERICA';
Chapter 8
parallelization