django - Postgresql 表分区 Django 项目

标签 django postgresql partitioning

我有一个使用 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/

相关文章:

javascript - 如何使用 django 在服务器端加密我的数据

python - 下面使用pyodbc解决Django SQLDriverConnect Error Occurred Below

php - 各种 Python/PHP Web 框架的相对优势是什么(特别是对于我的项目)?

python - 如何获取 http 响应代码Django 中的网址?

postgresql - JavaDB - Derby 中 PostgreSQL 'localtimestamp' 的等效项是什么?

sql - 在字段等于另一个值的地方插入新行

sql - 避免在 postgres plpgsql 函数中几乎重复查询

PostgreSQL 12 - 分区表错误的外键

mysql - 优化大 MySQL 表的搜索

partitioning - buildroot 中的其他分区