Django Table with Million of rows

前端 未结 6 1090
迷失自我
迷失自我 2021-02-06 04:20

I have a project with 2 applications ( books and reader ).

Books application has a table with 4 milions of rows with this fields:

 book_title = models.Ch         


        
6条回答
  •  佛祖请我去吃肉
    2021-02-06 05:08

    A common approach to this type of problem is Sharding. Unfortunately it's mostly up to the ORM to implement it (Hibernate does it wonderfully) and Django does not support this. However, I'm not sure 4 million rows is really all that bad. Your queries should still be entirely manageable.

    Perhaps you should look in to caching with something like memcached. Django supports this quite well.

提交回复
热议问题