mmm icon indicating copy to clipboard operation
mmm copied to clipboard

Use oplog_replay option to optimize queries on oplog

Open poudro opened this issue 12 years ago • 0 comments

Using an index on the oplog is not very efficient and degrades performance when a big number of writes are being performed in a short amount of time.

Mongo has an internal scheme to perform queries on the oplog that are activated when using the "oplog_replay" option with queries (bit num 3 on http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol#MongoWireProtocol-OPQUERY).

pymongo doesn't, as yet, allow for the option, although a similar pull-request was proposed for this very purpose.

Please consider applying this patch if pymongo updates the available options in the Cursor class init.

Thx :)

poudro avatar Nov 07 '12 11:11 poudro