Does enablig profile will impact operations on oplog?

Hi Team,

I have few questions on profiling ?
does enabling profile will also have impact on oplog and juornal files? if yes can we enable profiling only on primary not to reflect on replica servers?
Also can we enable profiling on secondary server?

@ naseer561

As the documentation here clearly says, profiling is per database. You may also want to review the documentation here on the oplog. Together these answer your questions.,

Hi DHz,

Thanks for your response.
if i understand correctly enabling profile will impact oplogs(since oplogs will capture changes of all database collections)
and we can’t enable profiling for any secondary server databases except local(since local database is not replicated to secondary)

correct me if i am wrong?

@ naseer561

Profiling will impact all operations on the database, but not the oplog directly, since that only generates inserts into the database. And you can enable profiling on any server.database – so you could enable it on a secondary – although that would be really, really counterproductive for (I hope) obvious reasons.

Thanks DHZ, still i have some confusion. if we enable profiling to particular database, system.profiler will be created and stored in same database.
I understand from the link which you gave that " The (oplog) is a special [capped collection] that keeps a rolling record of all operations that modify the data stored in your databases."

so in this case profiler collection is also part of database so it will not copy to secondary?

@ naseer561

The system.profile collection is not copied to the secondaries – as you can discover for yourself by spooling up a replica set and testing this. Good luck.

Thank you for clarifying. one more question is there any other collections apart from local database and system.profile collection that replica set will not copy?