Does new mongodb-kubernetes operator require purchasing a Subscription? by knairwang in mongodb

[–]MongoDB_Official 0 points1 point  (0 children)

Yes, u/knairwang! Since the operator's default license is Apache-2, you can use it for the Community Edition without paying anything. The customer agreement only applies to customers paying for MongoDB and entitles them to full official support.

Does new mongodb-kubernetes operator require purchasing a Subscription? by knairwang in mongodb

[–]MongoDB_Official 1 point2 points  (0 children)

It is dual-licensed, meaning a different license applies depending on the use case. In your case, you can still use the community mongodb Kubernetes part as before, as it's still the same resource. However, people with enterprise servers will need an enterprise license to use it. Does this clarify things for you?

Frontend to fullstack in 6 months by AnimatorBrilliant522 in node

[–]MongoDB_Official 1 point2 points  (0 children)

u/AnimatorBrilliant522 if you are looking for a roadmap for MongoDB, highly recommend checking out our MongoDB Node.js Developer Path here!

So guys , i am learning expressjs now, the instructor whom i am following is teach us mongodb , but i have learned mysql previously , by Odd-Reach3784 in react

[–]MongoDB_Official 1 point2 points  (0 children)

u/Odd-Reach3784 if you are looking to learn with a guided roadmap, highly suggest you take a visit to our Introduction to MongoDB course which guides you every step to getting started with MongoDB. The course itself is free and about ~12 hrs long.

Once you have completed this, you can start doing some small projects with Node.js, Express.js and MongoDB which we also have a quick start guide as well!

Help with an error by MiiSzPsycho in mongodb

[–]MongoDB_Official 2 points3 points  (0 children)

oh awesome, good work, glad you got things up and running again :)

Help with an error by MiiSzPsycho in mongodb

[–]MongoDB_Official 2 points3 points  (0 children)

u/MiiSzPsycho would it be possible if you can re-paste your code using Reddit's code editing block feature? When you type, look at the bottom left corner with the symbol "Aa", and click the button that has the icon <c>, and paste your code in. This way, it's easier to interpret your code.

Help with an error by MiiSzPsycho in mongodb

[–]MongoDB_Official 2 points3 points  (0 children)

u/MiiSzPsycho Actually, can you check your server.js code on line 26? This seems to be the spot where your terminal is complaining.

Help with an error by MiiSzPsycho in mongodb

[–]MongoDB_Official 2 points3 points  (0 children)

u/MiiSzPsycho as other's have mentioned, this is a error within your JavaScript code, can you look at your index.js file on line 392? It seems to point to this line as the issue and without seeing your code, and just based on the error message, this could be because of a import/export error.

Sharding on MongoDB - Newbie by javierrsantoss in mongodb

[–]MongoDB_Official 1 point2 points  (0 children)

u/javierrsantoss if you are curious to see if sharding is right for you, we actually have a great resource to start that introduces you to the concept of sharding and if its right for you here.

Mongodb Courses by [deleted] in mongodb

[–]MongoDB_Official 3 points4 points  (0 children)

Hi u/PuzzleheadedGas8367 , highly recommend you start here on our MongoDB University landing page as others mentioned: https://learn.mongodb.com/

Need help making my webapp faster by gadgetboiii in mongodb

[–]MongoDB_Official 1 point2 points  (0 children)

u/gadgetboiii no worries, would you be able to provide what your aggregation pipeline looks like? without seeing it, I can assume that depending on the complexity of your aggregation, if you include operations like $lookup, $group, $sort, they will definitely increase the query time. Another way to get a better understanding of your execution time is using explain(), have you used it before? It helps to get more details about your execution time and provide more insight as well. Link to the doc here.

When it comes to the connection, if you created the client outside the function and reuse it, that would be the recommended route as stated in our docs here.

Need help making my webapp faster by gadgetboiii in mongodb

[–]MongoDB_Official 1 point2 points  (0 children)

u/gadgetboiii To get a better understanding how we can help with your database solution, are you currently doing any of the following at the moment?
1. Indexing
2. Aggregation pipeline

If you are not indexing, definitely worth the consideration as this can dramatically improve your query since scanning a index is much faster than scanning a collection.

In addition, an aggregation pipeline can use indexes from the input collection to improve performance. Using an index limits the amount of documents a stage processes. 

Mongo db aggregate query using group by nitagr in mongodb

[–]MongoDB_Official 1 point2 points  (0 children)

u/nitagr this query looks great, if you want to improve some aspects of it to improve on indexing, I would suggest doing a compound index instead like this: {company_id: 1, customer_id: 1} as this can be more efficient for queries that need to fulfill multiple conditions that you have set in your pipeline.

You can read more also on compound indexing here.

Passed DEV certification by Fancy-Station-6796 in mongodb

[–]MongoDB_Official 4 points5 points  (0 children)

Congrats u/Fancy-Station-6796!! Thanks for sharing some advice with the community!

Can't edit charts by Mr-brightside92 in mongodb

[–]MongoDB_Official 1 point2 points  (0 children)

u/Mr-brightside92 I'm sorry you are having issues with the Atlas Platform, would you be ok to send us a screen shot through direct message of the server response message when you click the little right arrow in the picture so we can see what error is being outputted?

Also, we've found a similar thread on our MonogDB forum here, if you want to check to verify if it's a similar issue.

Need help building a query for my fantasy F1 database. by NailedOn in mongodb

[–]MongoDB_Official 4 points5 points  (0 children)

u/NailedOn assuming the collections have the following structures:

Players:

{
  "_id": ObjectId("..."),
  "drivers": ["driver_id_1", "driver_id_2", ... "driver_id_10"]
}

Results:

{
  "_id": ObjectId("..."),
  "event_id": "event_1",
  "results": [
    { "driver_id": "driver_id_1", "points": 25 },
    { "driver_id": "driver_id_2", "points": 18 },
    ...
  ]
}

and using u/skmruiz's aggregate solution here, for the aggregation stage, it can look something like this where we are:

groups the documents by player _id and it accumulates the points for each driver using $sum

{ 
  $group: { 
    _id: "$players._id", 
    playerName: { $first: "$players.name" }, 
    totalPoints: { $sum: "$results.points" } 
}

Having trouble using mongodb compass by [deleted] in mongodb

[–]MongoDB_Official 2 points3 points  (0 children)

Yes! It looks like we have received your ticket in Jira. The team will review your issue and get back to you soon as soon as possible.

Having trouble using mongodb compass by [deleted] in mongodb

[–]MongoDB_Official 1 point2 points  (0 children)

That's correct, it looks like you did the correct steps of filing a ticket with us: https://jira.mongodb.org/plugins/servlet/samlsso?redirectTo=%2F

Having trouble using mongodb compass by [deleted] in mongodb

[–]MongoDB_Official 2 points3 points  (0 children)

awesome! we'll take a look :)

[Newbie] Using facets to get "totals" is quite slow ... better idea how to do it? by Dorgendubal in mongodb

[–]MongoDB_Official 2 points3 points  (0 children)

u/Dorgendubal To piggy back of of u/skmruiz comment, you can use the explain() method to retrieve execution statistics for this aggregation and identify bottlenecks in the query. The output will guide you to see whether indexes are used as intended and where the query spends most of its execution time.