Recently, I am involved in a project where I have a collection of posts (comments). In this collection, I have around 20 millions posts where each document contains some information about each post (id, URL, content, author, likes, dislikes).
Yesterday, I tried to identify the number of posts per user meaning that as a result I would like to have the list of author with their number of posts.
To this end, I have used a simple java code... After around 10 hours, I got the result of only 180 users whereas I have more than 500 000 users in my collection. So, using my code I will need months :)
Please can you recommend me some tips to improve the efficiently of my queries.