page213
299
INSERT INTO part_customer_order_middle_east
SELECT *
FROM base_customer_order
WHERE region_name = 'MIDDLE EAST';
To preserve backward compatibility and be minimally invasive to the application,
you will drop the original table and replace with a view of the same name.
DROP TABLE core_customer_order;
CREATE OR REPLACE VIEW core_customer_order
COPY GRANTS
AS
SELECT customer_key, customer_name, order_key, order_date,
nation_name, region_name
FROM part_customer_order_asia
UNION ALL
SELECT customer_key, customer_name, order_key, order_date,
nation_name, region_name
FROM part_customer_order_europe
UNION ALL
SELECT customer_key, customer_name, order_key, order_date,
nation_name, region_name
FROM part_customer_order_africa
UNION ALL
SELECT customer_key, customer_name, order_key, order_date,
nation_name, region_name
FROM part_customer_order_america
UNION ALL
SELECT customer_key, customer_name, order_key, order_date,
nation_name, region_name
FROM part_customer_order_middle_east;
Chapter 8
parallelization