我有一个使用 Postgres 9.3 的 Django 1.7 项目。我有一张 table ,会有相当大的音量。该表每月将有 1300 万到 4000 万个新行。
我想知道将 Postgres 表分区与 Django 合并的最佳方法是什么?
最佳答案
您可以使用 Architect申请Postgresql Table Partitioning Django Project
PostgreSQL’s partitioning implementation in Architect is done purely at the database level. That means that Architect creates several triggers and functions and inserts them directly into the database, so even if you issue direct insert statement from database console and not from the ORM, everything will work as expected and record will be inserted into the correct partition, if partition doesn’t exist, it will be created for you automatically. Also partitions may be created in any order and not only from lower to higher.
这是旧版本的新版本Django DB Parti application
关于django - Postgresql 表分区 Django 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30564231/