Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: SQL Query takes too much time to return the response and it is affecting site performance #651

Open
umangsuthar opened this issue Nov 6, 2024 · 1 comment
Labels

Comments

@umangsuthar
Copy link

Describe the bug
This query is being called when homepage is loaded for our website. It is taking too much time and that is affecting the site performance significantly. Currently our site is taking around 10 seconds to load where almost 90% time taken by the below queries:

SELECT *
FROM wp_as3cf_items
WHERE (path LIKE '%wp-content/uploads/2024/10/11105620/cropped-cropped-logo-black.svg_.png'
OR original_path LIKE '%wp-content/uploads/2024/10/11105620/cropped-cropped-logo-black.svg_.png');
Screenshot 2024-11-06 at 12 02 16 PM

Please check above image for reference. This query is called for all the images which are at our home page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://fxis.ai/edu'
  2. Click on 'Home Page'
  3. Scroll down to '....'
  4. See error

Expected behavior
Ideally query should not take this much time to return the response data.

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2024-11-06 at 12 03 42 PM

debug.log
Capturing errors to debug.log and attaching to this issue will help immensely!

https://deliciousbrains.com/why-use-wp-debug-log-wordpress-development/

Diagnostic Info (from plugin's "Support" tab):
Attach file to issue (preferred) or paste here.

Additional context
Add any other context about the problem here.

@umangsuthar umangsuthar added the bug label Nov 6, 2024
@umangsuthar
Copy link
Author

We found this LINK where other developer updated the query which improves the performance of the site significantly:
https://wordpress.org/support/topic/offload-media-adds-6-seconds-of-mysql-queries/

Screenshot 2024-11-06 at 12 05 19 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant