asset/rate: speed up percent-queries
This commit is contained in:
parent
8eaddc9b28
commit
c06c2b8260
2 changed files with 29 additions and 26 deletions
7
rate.py
7
rate.py
|
@ -53,6 +53,13 @@ class Rate(SymbolMixin, ModelSQL, ModelView):
|
|||
Index(
|
||||
t,
|
||||
(t.rate, Index.Range())),
|
||||
Index(
|
||||
t,
|
||||
(t.asset, Index.Equality())),
|
||||
Index(
|
||||
t,
|
||||
(t.asset, Index.Equality()),
|
||||
(t.date, Index.Range(order='DESC'))),
|
||||
})
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue