首页 > 解决方案 > Greenplum creates a partition table is very slow

问题描述

I run psql to create a partition table. 2 hours are gone, but it doesn't complete. What's the problem? How to speed up? Thanks very much.

My command is

DROP SCHEMA IF EXISTS people_hotel CASCADE; CREATE SCHEMA people_hotel; SET SEARCH_PATH TO people_hotel, public, pg_catalog, pg_toolkit; ALTER ROLE user SET search_path TO people_hotel, public, pg_catalog, pg_toolkit;

drop table if exists people_hotel.event;
create table people_hotel.event (  event_id bigint,  time bigint, object bigint, loc_id integer )
distributed by (event_id)
PARTITION BY RANGE(time)
SUBPARTITION by range(object)
SUBPARTITION TEMPLATE (

    START (0) INCLUSIVE END (100000000) EXCLUSIVE EVERY (10000),
    DEFAULT SUBPARTITION other_object   ) (START (bigint '1527811200000') INCLUSIVE    END (bigint '1544975684280') INCLUSIVE   EVERY (bigint '2592000000'),   DEFAULT PARTITION other_time );

标签: create-tablegreenplum

解决方案


推荐阅读