add index for models

This commit is contained in:
2026-04-23 14:10:48 -06:00
parent 028ea6e5f9
commit e2d566436f
13 changed files with 165 additions and 29 deletions

View File

@@ -40,5 +40,8 @@ class Comment(models.Model):
class Meta:
db_table = "comment"
ordering = ("-create_time",)
indexes = [
models.Index(fields=["problem", "create_time"], name="comment_problem_time_idx"),
]