Tweak indexes
This commit is contained in:
parent
65082feecb
commit
6c4e213b72
1 changed files with 4 additions and 8 deletions
|
@ -15,7 +15,8 @@ def create_indexes():
|
|||
[(_meta(MetaKey.NOTIFICATION_UNREAD), pymongo.ASCENDING)]
|
||||
)
|
||||
DB.activities.create_index([("remote_id", pymongo.ASCENDING)])
|
||||
DB.activities.create_index([("activity.object.id", pymongo.ASCENDING)])
|
||||
DB.activities.create_index([("meta.actor_id", pymongo.ASCENDING)])
|
||||
DB.activities.create_index([("meta.object_id", pymongo.ASCENDING)])
|
||||
DB.activities.create_index([("meta.thread_root_parent", pymongo.ASCENDING)])
|
||||
DB.activities.create_index(
|
||||
[
|
||||
|
@ -26,14 +27,9 @@ def create_indexes():
|
|||
DB.activities.create_index(
|
||||
[("activity.object.id", pymongo.ASCENDING), ("meta.deleted", pymongo.ASCENDING)]
|
||||
)
|
||||
DB.cache2.create_index(
|
||||
[
|
||||
("path", pymongo.ASCENDING),
|
||||
("type", pymongo.ASCENDING),
|
||||
("arg", pymongo.ASCENDING),
|
||||
]
|
||||
DB.activities.create_index(
|
||||
[("meta.object_id", pymongo.ASCENDING), ("type", pymongo.ASCENDING)]
|
||||
)
|
||||
DB.cache2.create_index("date", expireAfterSeconds=3600 * 12)
|
||||
|
||||
# Index for the block query
|
||||
DB.activities.create_index(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue