-
Notifications
You must be signed in to change notification settings - Fork 800
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
Search / My Jetpack: Function get_raw_post_type_breakdown can render back end inaccessible #38130
Comments
Bump, would be nice to fix this. |
Thanks for the ping. Seems we need to improve performance of the query, or even is the call necessary? I can take a look but I don't think I can get onto it before September. Looping in @Automattic/jetpack-data-team in case they have something in mind 🙂 |
@kangzj It's the end of September, is there any news on this? |
Hmmm... we'll try to take a look at if there is a better way. That is a pretty big query on a large site and we should be able to do something smarter. |
thanks @gibrown I don't see any easy fixes. The only solution I can think of is to do the counting in batches. 🧐 |
@kangzj , I've looked in to this and @gibrown and I have also discussed the issue as well. There isn't an easy fix to this as you've noted and batching could be helpful to solve this. There are a few questions including:
A few thoughts on different solutions are:
Are there additional thoughts on the proposed solutions or options to consider? |
@kangzj, @gibrown I've worked on and tested out a resolution to another similar issue with the remote request and batching and that went well so far. I've created this PR which implements something similar for the My Jetpack |
Resolved and merged in #40635 |
Impacted plugin
Backup
Quick summary
I have a very large site with millions of records in the
_posts
table. The admin area (admin.php) is now inaccessible due to this query: "SELECT post_type, post_status, COUNT( * ) AS num_posts FROM ***_posts WHERE post_password = '' GROUP BY post_type, post_status"I traced this back to plugins\jetpack-backup\jetpack_vendor\automattic\jetpack-my-jetpack\src\products\class-search-stats.php,
Line 140
The function get_raw_post_type_breakdown() is the culprit.
Steps to reproduce
A clear and concise description of what you expected to happen.
Back end should load without much delay.
What actually happened
The back end timed out.
Impact
All
Available workarounds?
No but the platform is still usable
Platform (Simple and/or Atomic)
Self-hosted
Logs or notes
Jetpack Backup 2.6
The text was updated successfully, but these errors were encountered: