We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
今天有朋友说他们项目有开发写的查询有问题,导致线上mongodb全表扫描,拖慢了整个数据库,该怎么避免好?我有一个小想法,因为功能肯定在测试环境有验收,只是测试环境数据量比不上线上环境,因此问题没有发现,那么如果我转换为只关注查询时是不是对整表或者大比例的节点扫描。方案如下:
db.system.profile
The text was updated successfully, but these errors were encountered:
No branches or pull requests
今天有朋友说他们项目有开发写的查询有问题,导致线上mongodb全表扫描,拖慢了整个数据库,该怎么避免好?我有一个小想法,因为功能肯定在测试环境有验收,只是测试环境数据量比不上线上环境,因此问题没有发现,那么如果我转换为只关注查询时是不是对整表或者大比例的节点扫描。方案如下:
db.system.profile
取记录,查看每个请求对应的扫描文档数与其对应的表的总数(如果超时20%则该请求有问题的概率较大)The text was updated successfully, but these errors were encountered: