postgresql 分表

create table test_part
(
id int,
name varchar,
age numeric
) partition by range (age);
create table test_part_yong partition of test_part for values from (MINVALUE ) to (25);
create table test_part_medium partition of test_part for values from (25) to (75);
create table test_part_old partition of test_part for values from (75) to (maxvalue );

配合触发器功能可以自动创建分表

posted @   那时一个人  阅读(90)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
历史上的今天:
2021-09-26 odoo12 支付宝在线支付
点击右上角即可分享
微信分享提示