1. 首页
  2. 数据库
  3. 其它
  4. mongoose profiler:用于Mongoose的性能调整工具。 查询缓慢时显示解释结果 源码

mongoose profiler:用于Mongoose的性能调整工具。 查询缓慢时显示解释结果 源码

上传者: 2021-02-06 13:01:36上传 ZIP文件 12.02KB 热度 14次
猫鼬轮廓 这是一个用于优化性能的插件。 查询缓慢时,它将在控制台上显示。 如mongodb扫描集合中的所有文档而没有索引。 不要在生产中使用它。 安装 $ npm install mongoose-profiler --save-dev 快速开始 const mongooseProfiler = require ( 'mongoose-profiler' ) ; schema . plugin ( mongooseProfiler ( ) ) ; 当您执行不带索引的查询时,您将在控制台上看到一些消息。 ProductModel . where ( { state : 'active'
下载地址
用户评论