design-system icon indicating copy to clipboard operation
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

Open shubhamkhunt88 opened this issue 6 months ago • 2 comments

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

  1. Create a collection type (e.g., articles) with at least one dynamic zone containing multiple components.
  2. Insert approximately 3 lakh records (300,000+) into the collection, including data for the dynamic zone and its components.
  3. Use the default GET /api/[collection] endpoint to fetch data.
  4. 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?

shubhamkhunt88 avatar May 09 '25 09:05 shubhamkhunt88

@amerikan @handu @jorrit @dharamgollapudi can you guys check this please? , I need to upload 1-2 Crore records into strapi single collection.

shubhamkhunt88 avatar May 13 '25 10:05 shubhamkhunt88

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

simotae14 avatar Jun 18 '25 10:06 simotae14

I am gonna close it because it was opened in the wrong repo, thanks

simotae14 avatar Aug 07 '25 13:08 simotae14