When I show order history using this API

/rest/V1/orders/mine?searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value][email protected]

It take 20-30 seconds.

How to minimize response time for this API? Please Suggest me.

  • I've noticed this with some Magento2 clients that we connect to via API. It sometimes takes several minutes!!! Since I don't have direct access to their servers I cannot tell, but I suspect it is a missing or incorrect database index causing Magento to do a full table scan.
    – William W
    Commented Nov 15, 2018 at 18:50

1 Answer 1


See my answer here

If possible, limit not only the fields returned but also the date range, via "created_at", that is searched.

Paging, as described here, will also speed up responses, but be aware that Magento may return duplicate results if an invalid page number is specified.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.