create-table - 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 );
- greenplum runs with 1 master and 2 segment hosts, each host have 10 instances( 10 primary directory)
- Greenplum version: 5.9.0
- OS version: ubuntu 16.04
解决方案
推荐阅读
- javascript - 用于绘图的 React UseEffect
- javascript - Brython:拒绝加载脚本....违反以下内容安全策略指令:“script-src 'self'
- swift - 使用 WebView 以 100% 的比例打开网站
- python - 使用python循环遍历列表以在csv文件中写入新行的问题
- r - 'list' 对象不能被强制输入'integer' -- WRS2 包
- single-sign-on - 如何使用 IdentityServer 在 Web 应用程序和本机应用程序之间实现 SSO?
- sql - 大更新后,单个 PostgreSQL 表的查找突然变得非常慢
- datetime - Ms-Access 将日期时间转换为自纪元以来的秒数
- typescript - 有没有在 TypeScrip 中编写 firebase-messaging-sw.js 文件的好方法?
- magento - 由于以下限制,如何启用 Magento 2.4 模块