commercetools / commercetools/sphere-order-export
Inefficient query for export on large project
- Dominant language
- CoffeeScript
- Stars
- 4
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
### Support reference number
SUPPORT-16165
### Description
```js
/bigcustomer-prod/orders?sort=id%20asc&where=createdAt%3E%20%22[REDACTED]%22%20AND%20createdAt%3C%3D%20%22[REDACTED]%22&limit=100&expand=customLineItems%5B*%5D.state%5B*%5D.state&expand=lineItems%5B*%5D.state%5B*%5D.state&expand=lineItems%5B*%5D.supplyChannel&expand=discountCodes%5B*%5D.discountCode&expand=customerGroup&withTotal=false&where=id%20%3E%20%22[REDACTED]%22
```
### Expected Behaviour
export orders without error for project with more than 20k orders per pay
### Current Behaviour
times out even with 1 day interval
### more efficient query
To avoid request times out
Query must sort by createdAt and id and increment the **fromDate** and the **Id** in the loop
Contributor guide
Assessment
This issue has not been assessed yet.