In one of my projects, the client was using MongoDB and S3 for segmentation. Their approach was to store data in S3, then whenever they needed to perform operations, they would first store the data in a temporary file, process it, and finally save the results back into MongoDB. This process was very time-consuming.
To improve it, I replaced MongoDB with PostgreSQL and DuckDB. DuckDB allowed me to query data directly from the S3 bucket without saving it locally, which made the output around 50% faster compared to the original approach.
Now, Iβm looking for an even more optimized or scalable approach to handle this kind of workflow.
One more thing If I want to showcase user data to frontend to show 5000 rows or more it's taking a lot time.