Slow write and update data

I am update data from mongo db with structure:

{
org: {
  id
  name,
  coords,
  category: {
      id, name
  }
}
}

and have index: org.coords_1org.category.id_1

In error I look warning and update is very slow
“Insert of geo object generated a large number of keys”

how can I speed it up?

Hey @Artem_Sh,

Welcome to the MongoDB Community forums!

The document structure you’ve shared isn’t very clear. Could you please provide the following details:

  1. The version of MongoDB you’re using,
  2. The specific error you’re encountering,
  3. Sample documents from the collection you’re working with,
  4. The query you’re executing to update the documents,
  5. Output of db.collection.stats() along with the deployment configuration,
  6. Confirmation if you’re using MongoDB local server or MongoDB Atlas.

May I ask where you are noticing this error? Are you using any MongoDB driver to perform the update, or are you executing it directly from the mongosh?

Providing these information will help others better understand the issue and assist you better.

Best regards,
Kushagra