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: Slow query in Sync Settings page #3965

Open
1 task done
majiix opened this issue Aug 19, 2024 · 1 comment
Open
1 task done

BUG: Slow query in Sync Settings page #3965

majiix opened this issue Aug 19, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@majiix
Copy link

majiix commented Aug 19, 2024

Describe the bug

On visiting Sync Settings page while query monitor is active i get this slow query in the log for elasticPress:

Query:

SELECT DISTINCT meta_key
FROM wp_postmeta
WHERE meta_key NOT LIKE '\\_%'
LIMIT 800

Caller:
ElasticPress\I\P\Post->get_distinct_meta_field_keys_db()

Steps to Reproduce

1- Activate query monitor
2- activate elasticpress
3- visit sync settings page

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@majiix majiix added the bug Something isn't working label Aug 19, 2024
@felipeelia
Copy link
Member

Thanks for opening the issue @majiix. That comes from AdminNotices::process_too_many_fields_notice() and we'll work on a change to have it work better on EP 5.0 (since the meta field calculation can be done differently now.)

In the meantime, this snippet should skip that check:

add_filter( 'pre_option_ep_hide_too_many_fields_notice', '__return_true' );

@felipeelia felipeelia added this to the 5.2.0 milestone Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants