Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6382735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:33:41+00:00 2026-05-25T02:33:41+00:00

In mongo db > show dbs admin (empty) data 23.9423828125GB local (empty) I have

  • 0

In mongo db

> show dbs
admin   (empty)
data    23.9423828125GB
local   (empty)

I have a table with an index:

> db.XXX.count();
80089670

C#:

voteCol.EnsureIndex("({ YYY:1 })");

When I am doing a query with the C# driver:

MongoCollection<BsonDocument> voteCol = database.GetCollection<BsonDocument>("XXX");
var query = new QueryDocument("YYY", DataUtils.getItemInPollIdList());
MongoCursor<BsonDocument> cursor =      voteCol.Find(query).SetSortOrder(SortBy.Descending("ZZZ")).SetLimit(10).SetSkip(20);

The execution time for this part of the code is close to 0.

Then when I am trying to get the size of the cursor

cursor.Size();

I get a timeout.

Unable to read data from the transport connection: A connection
attempt failed because the connected party did not properly respond
after a period of time, or established connection failed because
connected host has failed to respond.

In Mongo log

Mon Aug 22 10:08:50 [conn9] query data.XXX ntoreturn:1 reslen:36
nscanned:80089670 { YYY: “1482092” } nreturned:0 48935ms

What can it be? When the query is really executed? Why I can’t get the results?

Edit 1: Added new index

Mon Aug 22 10:17:38 [conn12] building new index on { ({ YYY:-1 }): 1 }
for data.XXX

            4000000/80089670        4%
            7866400/80089670        9%
            11403000/80089670       14%
            15000000/80089670       18%
            19000000/80089670       23%
            22988600/80089670       28%
            26454700/80089670       33%
            30000000/80089670       37%
            33438600/80089670       41%
            37000000/80089670       46%
            40810600/80089670       50%
            44132200/80089670       55%
            48000000/80089670       59%
            52000000/80089670       64%
            55618300/80089670       69%
            59000000/80089670       73%
            62170100/80089670       77%
            66000000/80089670       82%
            70000000/80089670       87%
            74000000/80089670       92%
            77874500/80089670       97%

Even with the new index – same issue:
Mongo shell:

> printjson(db.XXX.findOne({YYY:"1517077"}));

MongoLog

Mon Aug 22 10:33:40 [conn4] query data.XXX ntoreturn:1 reslen:36 nscanned:80089670 { YYY: "1517077" }  nreturned:0 48751ms
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:33:42+00:00Added an answer on May 25, 2026 at 2:33 am

    I did a mistake – all is case sensitive in mongoDb.

    I added an index on yyy instead of YYY.

    No warning message even if I have nothing named yyy in the table and the index was created successfully :(.

    I recreated an index on the correct column name. Everything is fast now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a table in which a row contains following data. So i need
In Mongo my understanding is that you can have databases and collections. I'm working
I have a Mongo server running on an Ubuntu box, and I am trying
I am using mongo-ruby-driver, I want to get stats/query graphs to show for Mongo.
Ok i am using mongo db and have a repeating region on my page:
I'm building a Mango app that writes data to a SqlCe database; I have
I have a file called hellowf.cs class MyFirstApp { static void Main() { System.Windows.Forms.MessageBox.Show(Hello,
I am using mongoVUE as mongo admin UI. My mongo server is running with
I have a Mono application that should not show on the dock, but will
Mango tiles have two sides. Tiles flip automatically to show 2 sides. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.