mongodb - How expensive is db.stats()? -
i need ping mongodb database on regular basis , wondering if safe execute db.stats() on every ping. "safe" mean db.stats() "cheap" operation not disrupt or lower overall db performance.
db.stats()
takes read lock, overall not costly operation. time required run command depends on total size of database. command must touch data files may take several seconds run.
Comments
Post a Comment