更新时间:2022-03-25 09:18:43
您正在过滤没有索引的字段。表越大,数据库需要扫描每一行所花费的时间就越长。更改字段定义以允许使用索引并进行迁移。
You are filtering on a field without an index. The bigger the table, the longer it takes as the database needs to scan each row. Alter your field definition to allow for an index and take care of migrations.
language = models.CharField(max_length=10, choices=LANGUAGES, default='bn' db_index=True)