[SERVER-61024] count slowly Created: 27/Oct/21  Updated: 28/Oct/21  Resolved: 27/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: du liu Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File image-2021-10-27-15-06-20-573.png    
Operating System: ALL
Participants:

 Description   

MongoDB Server Version: 3.2.21

Using a query witch consists of ** a index key, It also spend long time: 2730ms.

This is the query explain:

By the document, it says:

When performing a count, MongoDB can return the count using only the index if:

  • the query can use an index,
  • the query only contains conditions on the keys of the index, and
  • the query predicates access a single contiguous range of index keys.

And I only use `attributes.ci_type` in the filter.

 



 Comments   
Comment by du liu [ 28/Oct/21 ]

Sorry and thanks for your reply. 

Comment by Edwin Zhou [ 27/Oct/21 ]

Hi mrliuxiansen8023@gmail.com,

For this issue we'd like to encourage you to start by asking our community for help by posting on the MongoDB Developer Community Forums. Please note that MongoDB v3.2 reached end of life in September 2018 and is no longer supported. I advise you to upgrade your cluster to MongoDB v4.0+ prior to asking for help on the community forums to minimize any delays for getting the help you need.

If the discussion there leads you to suspect a bug in the MongoDB server, then we'd want to investigate it as a possible bug here in the SERVER project.

Best,
Edwin

Generated at Thu Feb 08 05:51:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.