Django Table with Million of rows

前端 未结 6 1084
迷失自我
迷失自我 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:15

    ForeignKey is implemented as IntegerField in the database, so you save little to nothing at the cost of crippling your model.

    Edit: And for pete's sake, keep it in one table and use indexes as appropriate.

提交回复
热议问题