Table partitioning models in Django with PostgreSQL
Hello. This topic is about how relatively quickly and painlessly configure partitioning (protezirovanie) table for months, if you use Django+PostgreSQL. Much of the above is suitable for other frameworks and ORM. About what partitioning is and why it is needed, you can read, for example, here , here and here . So, there is a project on Django and the table is one of the models must be very large. If the reading from this table occurs frequently, and always known the time period in which the recording was made, the partitioning can speed up the database. Every time to write queries to include a partition is not very desirable, so let's try to automate it. Well, if the outcome is something I can use and not much familiar with SQL. I've read the docs, so you don't have to. First I will tell you how quickly try my groundwork, and then about what's under the hood. Act as follows: the Catch the syncdb to add commands partitioning. the Plug-in SQL t