我有下表(下图),并计划每天添加2.5亿行,并且我试图按日期对其进行分区,想知道如何在Postgres 10中做到最好,如果有的话一种自动创建分区的方法。
CREATE UNLOGGED TABLE public.pricing
(
uitid character varying(40),
batch character varying(32),
scenario character varying(32),
date date NOT NULL,
pv double precision,
ctime real,
CONSTRAINT pricing_pkey PRIMARY KEY (uitid, batch, scenario, date)
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;