More performant index
PeteMac88 opened this issue · comments
Peter Macherey commented
I'm having an issue:
I observed that after that the interval query generates quite a lot of load on the database after a while in case the keepHistory
option is enabled. The problem is that the query in the __send
function is triggering the compound index which first index sentAt
is a timestamp. Because of the timestamp the database always needs to search a lot of index keys before returning the reults.
I have a suggestion:
I would suggest putting the isSent
index as the first index of the compound index.
Peter Macherey commented
I added a PR #35
dr.dimitru commented
@PeteMac88 published as v1.3.4