Add submission indexes to optimize user_problems
This commit is contained in:
parent
ec2c2ccf13
commit
d2f261acfe
3 changed files with 64 additions and 41 deletions
27
judge/migrations/0154_add_submission_indexes.py
Normal file
27
judge/migrations/0154_add_submission_indexes.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Generated by Django 3.2.18 on 2023-03-08 01:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("judge", "0153_drop_comment_page"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddIndex(
|
||||
model_name="submission",
|
||||
index=models.Index(
|
||||
fields=["problem", "user", "-points"],
|
||||
name="judge_submi_problem_5687ea_idx",
|
||||
),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="submission",
|
||||
index=models.Index(
|
||||
fields=["contest_object", "problem", "user", "-points"],
|
||||
name="judge_submi_contest_31cdbb_idx",
|
||||
),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue