design-system
design-system copied to clipboard
[bug]: When I have more than 3 lakh records, it is taking too much time (~20 seconds) in default find API
What version of design-system are you using?
- Version : 5.9.0
What's Wrong?
When using the default find API in Strapi with a collection that contains over 300,000 records (including complex nested dynamic zone components), the response time becomes excessively slow—around 20 seconds for a single request. This performance issue severely impacts scalability and usability for large datasets.
To Reproduce
- Create a collection type (e.g., articles) with at least one dynamic zone containing multiple components.
- Insert approximately 3 lakh records (300,000+) into the collection, including data for the dynamic zone and its components.
- Use the default GET /api/[collection] endpoint to fetch data.
- Observe the response time (around 20 seconds or more).
Expected Behaviour
The API should return data significantly faster, even with large datasets. Ideally, response times should remain under 2-3 seconds for standard queries without filters or pagination, especially with properly indexed databases.
Concern About Scalability:
I plan to scale this dataset to 1–2 crore (10–20 million) records in the near future, and it will continue to grow over time. Given the current performance bottlenecks, I am concerned that the system will become increasingly unusable.
What are the recommended strategies to handle this level of scale in Strapi?
@amerikan @handu @jorrit @dharamgollapudi can you guys check this please? , I need to upload 1-2 Crore records into strapi single collection.
Hello @shubhamkhunt88 I think you have opened the bug in the wrong repo, this one is the Design System repo, I think it is better to open the github issue in the Strapi repo https://github.com/strapi/strapi/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+%28label%3A%22issue%3A+bug%22+OR+type%3ABug%29 Thanks
I am gonna close it because it was opened in the wrong repo, thanks