• Resolved Memo

    (@gtenaschuk)


    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!

Viewing 1 replies (of 1 total)
  • Plugin Author MakeWebBetter

    (@makewebbetter)

    Hello,

    I hope you are doing well!

    The orders are filtered based on the date so that the latest orders are synchronized with HubSpot. This ensures that the most recent data is prioritized during the synchronization process. While this query does not typically take much time, we understand that it may result in slower performance for larger datasets.

    We greatly appreciate your suggestion about optimizing the query by making the ORDER BY date optional. We’ll evaluate this approach for future updates to improve performance without compromising functionality.

    In the meantime, if you have any queries, please contact our support team at [email protected].

    Thank you 


Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.