Add an index for lookup by account to log entries
Also fixes the query to require one less join
This commit is contained in:
parent
d9b65b88e9
commit
0f46230493
4 changed files with 36 additions and 14 deletions
|
@ -730,10 +730,9 @@ class LogEntry(BaseModel):
|
|||
database = db
|
||||
read_slaves = (read_slave,)
|
||||
indexes = (
|
||||
# create an index on repository and date
|
||||
(('account', 'datetime'), False),
|
||||
(('performer', 'datetime'), False),
|
||||
(('repository', 'datetime'), False),
|
||||
|
||||
# create an index on repository, date and kind
|
||||
(('repository', 'datetime', 'kind'), False),
|
||||
)
|
||||
|
||||
|
|
Reference in a new issue