如果我有一个使用Postgres的多租户体系结构,那么创建AccountId作为集群索引的一部分是有益的吗?对大型多租户体系结构设计中一些良好的数据库设计原则有参考吗?
例如:
创建表订单( orderid uuid NULL,accountid bigint NULL)。。)
发布于 2022-07-27 12:41:50
@jjane纠正了我的观点: Postgres没有设计的集群索引。可以使用群集命令按索引重新排序记录。https://www.postgresql.org/docs/current/sql-cluster.html
这篇文章解释得很好。About clustered index in postgres
使用群集可以缩短帐户作为索引的一部分的查找时间。https://www.postgresonline.com/journal/archives/10-How-does-CLUSTER-ON-improve-index-performance.html
https://stackoverflow.com/questions/73121487
复制相似问题