Skip to content

Commit

Permalink
Better index hints
Browse files Browse the repository at this point in the history
As X-Road usually has more service clients than producers, using client based index returns fewer rows and performs better
  • Loading branch information
VitaliStupin committed Feb 13, 2024
1 parent 9d72061 commit b4b4018
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reports_module/opmon_reports/database_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ def get_faulty_documents(self, target, start_time, end_time):
"producer.requestInTs": {"$gte": start_time, "$lte": end_time}
},
"hint": [
("client.serviceMemberCode", 1),
("client.serviceSubsystemCode", 1),
("client.requestInTs", 1)
("producer.clientMemberCode", 1),
("producer.clientSubsystemCode", 1),
("producer.requestInTs", 1)
]
}

Expand Down

0 comments on commit b4b4018

Please sign in to comment.