Indexing the mongo oplog

1.6k views Asked by At

Is it wise/recommended/possible to build an index on the oplog.rs collection? The reason I ask is that I believe that it is the cause of our constant alerts regarding scanned object/returned surpassing 1000. Is this possible or does that alert not take the oplog/local into account?

I have combed our code to ensure indexing is present for all queries (it is quite a small code base all in all). I have also gone through the logs to ensure there is no presence of any COLLSCAN - hence the possible explanation that the oplog.rs collection is responsible for these alerts. Another factor here being that the alert fluctuates extremely wildly - from sub 100 to 1500 - which sounds like it would be oplog related.

Thanks in advance!

0

There are 0 answers