Django Table with Million of rows

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

    Are you having performance problems? If so, you might need to add a few indexes.

    One way to get an idea where an index would help is by looking at your db server's query log (instructions here if you're on MySQL).

    If you're not having performance problems, then just go with it. Databases are made to handle millions of records, and django is pretty good at generating sensible queries.

提交回复
热议问题