Performance issue - pymongo - fetching all entries in index - over 1 mill names?

Hi all, so using pymongo and filter to just select just names (which I have in a single unique index) also excluded _id.

When looping over the returned names and adding them to a set it seems to struggle and take a long time to complete the operation. However, if I pull the details from a text file with the same information I can complete the same operation very quickly.

Is there a better way to fetch data one has in an index other than using find please?

2 Likes

Hello @Damien_N_A – wondering if you figured out the solution to the performance issue you were having?

I am having a similar problem, the cursor is taking forever.

Thanks.
Juan Luna

Please provide your code, some sample data, and your list_indexes() output for us to debug.

Thank you Shane. You have seen my other post already – I was just wondering if Damien got his answer.