Slow query performance on re sync orders as deal process
-
Hi, we are having very slow queries when the method hubwoo_deals_sync_check is executed, we have a bunch of orders in the history and sometimes the query executed in that method takes ~20seconds
The query executed is in the file admin/class-hubwoo-admin.php line 2681
Doing some research about possible problems, the main issue is in the order by because the limit is 3 items per row but as it is using the order by date the query needs to read all the elements to apply the order instead of returning the result as soon as it found the first 3 items.
I think that this order by date is not necessary or could be optional if you want to sync latest orders first since after removing the order by from the query, the query ran in ~0.019seconds.
Thanks!
- You must be logged in to reply to this topic.