add indexes to improve the speed of calc.py

fixes #33
This commit is contained in:
2021-08-25 18:02:23 +02:00
parent 8e167a3577
commit 30c3f19d80
4 changed files with 42 additions and 0 deletions
+4
View File
@@ -8,3 +8,7 @@ class ExchangeRate(models.Model):
datetime_valid = models.DateTimeField('datetime valid')
class Meta:
db_table = "exchangerate"
indexes = [
models.Index(fields=['crypto_currency', 'fiat_currency', 'datetime_valid',]),
]