Slow queries in the core
-
SELECT DISTINCT meta_key
FROM wp_postmeta
WHERE meta_key NOT BETWEEN ‘_’
AND ‘_z’
HAVING meta_key NOT LIKE ‘_%’
ORDER BY meta_key
LIMIT 30
meta_form()
wp-admin/includes/template.php:695
post_custom_meta_box()
wp-admin/includes/meta-boxes.php:775
do_meta_boxes()
wp-admin/includes/template.php:1395I’m getting a few core slow queries which I’m not sure where to start
-
Hi @burner9000,
Let’s start checking if there is an error on the WooCommerce Logs. Kindly provide us the following:
- System Status: You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
- Fatal Error Log: Share a copy of any fatal error log found under WooCommerce > System Status > Logs (if available).
Thanks!
Hi there,
Since we haven’t heard from you in a while, we’re hoping that means you were able to get this resolved. I’m going to close this thread out now.
If you’re still having trouble, please open up a new topic and we’ll be happy to help out.
Thanks.
Hee is the status report, it is still happening
### WordPress Environment ### WordPress address (URL): https://www.rodburn.com.au Site address (URL): https://www.rodburn.com.au WC Version: 5.6.0 REST API Version: ? 5.6.0 WC Blocks Version: ? 5.5.1 Action Scheduler Version: ? 3.2.1 WC Admin Version: ? 2.5.1 Log Directory Writable: ? WP Version: 5.8 WP Multisite: – WP Memory Limit: 3 GB WP Debug Mode: ? WP Cron: – Language: en_AU External object cache: ? ### Server Environment ### Server Info: Apache PHP Version: 7.4.22 PHP Post Max Size: 256 MB PHP Time Limit: 300 PHP Max Input Vars: 3000 cURL Version: 7.66.0 OpenSSL/1.1.1k-fips SUHOSIN Installed: – MySQL Version: 5.7.32-35-log Max Upload Size: 256 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 5.6.0 WC Database Prefix: wp_ Total Database Size: 226.53MB Database Data Size: 168.04MB Database Index Size: 58.49MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.13MB + Index: 0.05MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 1.52MB + Index: 0.69MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB a_esync_temp_product: Data: 0.02MB + Index: 0.00MB + Engine InnoDB EXO_BILLOMAT_HDR: Data: 0.02MB + Index: 0.00MB + Engine InnoDB EXO_BILLOMAT_HDR_OLD: Data: 0.02MB + Index: 0.00MB + Engine InnoDB EXO_BILLOMAT_LINES: Data: 0.06MB + Index: 0.00MB + Engine InnoDB EXO_BILLOMAT_LINES_OLD: Data: 0.06MB + Index: 0.00MB + Engine InnoDB EXO_DR_ACCS: Data: 3.52MB + Index: 0.00MB + Engine InnoDB EXO_DR_ACCS_OLD: Data: 3.52MB + Index: 0.00MB + Engine InnoDB EXO_DR_PRICES: Data: 1.52MB + Index: 0.00MB + Engine InnoDB EXO_DR_PRICES_OLD: Data: 1.52MB + Index: 0.00MB + Engine InnoDB EXO_DR_PRICE_POLICY: Data: 0.05MB + Index: 0.00MB + Engine InnoDB EXO_DR_PRICE_POLICY_ACC: Data: 0.14MB + Index: 0.00MB + Engine InnoDB EXO_DR_PRICE_POLICY_ACC_OLD: Data: 0.14MB + Index: 0.00MB + Engine InnoDB EXO_DR_PRICE_POLICY_OLD: Data: 0.05MB + Index: 0.00MB + Engine InnoDB EXO_PROFILE_FIELDS: Data: 0.02MB + Index: 0.00MB + Engine InnoDB EXO_PROFILE_FIELDS_OLD: Data: 0.02MB + Index: 0.00MB + Engine InnoDB EXO_PROFILE_VALUES: Data: 0.02MB + Index: 0.00MB + Engine InnoDB EXO_PROFILE_VALUES_OLD: Data: 0.02MB + Index: 0.00MB + Engine InnoDB EXO_STOCK_ITEMS: Data: 9.55MB + Index: 0.00MB + Engine InnoDB EXO_STOCK_ITEMS_OLD: Data: 9.55MB + Index: 0.00MB + Engine InnoDB mi_invoice_payments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB myint_price_check: Data: 0.20MB + Index: 0.00MB + Engine InnoDB wp_actionscheduler_actions: Data: 11.52MB + Index: 12.70MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 8.52MB + Index: 5.95MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.33MB + Index: 0.30MB + Engine InnoDB wp_commercekit_searches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commercekit_waitlist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commercekit_wishlist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commercekit_wishlist_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_enquiry_detail_new: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_enquiry_history: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_enquiry_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_enquiry_products: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_enquiry_quotation: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_enquiry_quotation_version: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_enquiry_thread: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gla_budget_recommendations: Data: 0.20MB + Index: 0.11MB + Engine InnoDB wp_gla_merchant_issues: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wp_gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_capability: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_groups_group: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_group_capability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_user_capability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_user_group: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 5.52MB + Index: 0.58MB + Engine InnoDB wp_postmeta: Data: 50.58MB + Index: 25.08MB + Engine InnoDB wp_posts: Data: 4.52MB + Index: 1.11MB + Engine InnoDB wp_redirection_404: Data: 6.02MB + Index: 1.77MB + Engine InnoDB wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_redirection_items: Data: 0.44MB + Index: 0.47MB + Engine InnoDB wp_redirection_logs: Data: 3.02MB + Index: 0.45MB + Engine InnoDB wp_rg_incomplete_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rg_lead: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_rg_lead_detail: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_rg_lead_detail_long: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rg_lead_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_rg_lead_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_sgs_log_events: Data: 20.55MB + Index: 0.00MB + Engine InnoDB wp_sgs_log_visitors: Data: 0.28MB + Index: 0.00MB + Engine InnoDB wp_smconnector_failed_login: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_smconnector_session_keys: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_termmeta: Data: 0.33MB + Index: 0.30MB + Engine InnoDB wp_terms: Data: 0.13MB + Index: 0.14MB + Engine InnoDB wp_term_relationships: Data: 1.52MB + Index: 0.33MB + Engine InnoDB wp_term_taxonomy: Data: 0.22MB + Index: 0.14MB + Engine InnoDB wp_tg_item_elements: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_tg_item_skins: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_usermeta: Data: 2.52MB + Index: 2.77MB + Engine InnoDB wp_users: Data: 0.09MB + Index: 0.05MB + Engine InnoDB wp_wcj_track_users: Data: 6.52MB + Index: 0.00MB + Engine InnoDB wp_wcsp_global_discount_rule_mapping: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wcsp_group_category_pricing_mapping: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wcsp_role_category_pricing_mapping: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wcsp_user_category_pricing_mapping: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.28MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.09MB + Index: 0.08MB + Engine InnoDB wp_wc_cvo_cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.11MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.05MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.38MB + Index: 0.72MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_bundled_itemmeta: Data: 0.11MB + Index: 0.11MB + Engine InnoDB wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woof_query_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmailsmtp_tasks_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wusp_group_product_price_mapping: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wusp_role_pricing_mapping: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wusp_rules: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wusp_subrules: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_yith_wcwl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yith_wcwl_lists: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_yoast_indexable: Data: 7.52MB + Index: 1.67MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 1.52MB + Index: 0.94MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.11MB + Index: 0.11MB + Engine InnoDB wp_yoast_prominent_words: Data: 0.13MB + Index: 0.13MB + Engine InnoDB wp_yoast_seo_links: Data: 0.09MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_meta: Data: 1.52MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### acf-field: 1 acf-field-group: 1 aoc_popup: 1 attachment: 4846 cs_template: 1 custom_css: 4 customize_changeset: 10 cwginstocknotifier: 289 elementor_library: 11 envira: 1 event: 1 lp_lesson: 3 lp_order: 1 lp_question: 3 lp_quiz: 1 namaste_course: 1 namaste_lesson: 1 nav_menu_item: 62 oembed_cache: 26 page: 25 page-generator-pro: 1 post: 17 product: 987 product_variation: 2090 revision: 2 shop_coupon: 18 shop_order: 218 shop_subscription: 1 the_grid: 1 wp_block: 1 wpcf7_contact_form: 1 wpcf7r_action: 7 yith-wcbm-badge: 1 ywctm-button-label: 5 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (49) ### Query Monitor: by John Blackbourn – 3.7.1 Booster Plus for WooCommerce: by Pluggabl LLC – 5.4.4 Code Snippets: by Code Snippets Pro – 2.14.1 CommerceGurus Commercekit: by CommerceGurus – 1.3.0 Contact Form 7: by Takayuki Miyoshi – 5.4.2 Elementor: by Elementor.com – 3.4.2 Google Listings and Ads: by WooCommerce – 1.4.1 Site Kit by Google: by Google – 1.39.0 Health Check & Troubleshooting: by The www.remarpro.com community – 1.4.5 Kadence WooCommerce Email Designer: by Kadence WP – 1.4.7 Kirki Customizer Framework: by David Vongries – 3.1.9 HubSpot All-In-One Marketing - Forms, Popups, Live Chat: by HubSpot – 8.4.90 MyIntegrator - Breadcrumbs: by MyIntegrator – 1.0 MyIntegrator - HubSpot Contact Integration: by MyIntegrator – 1.0 MyIntegrator - MYOB Exo: by MyIntegrator – 1.0 MyIntegrator - Persona: by MyIntegrator – 1.0 MyIntegrator - Product categories side menu widget: by MyIntegrator – 1.0 MyIntegrator - Custom Single Product page: by MyIntegrator – 1.0 MyIntegrator - Product categories top menu: by MyIntegrator – 1.0 Perfect Brands for WooCommerce: by QuadLayers – 1.9.3 Redirection: by John Godley – 5.1.3 SiteGround Optimizer: by SiteGround – 5.9.3 SiteGround Security: by SiteGround – 1.1.2 Smart WooCommerce Search PRO: by YummyWP – 2.3.5 Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri Inc. – 1.8.28 Temporary Login Without Password: by StoreApps – 1.6.14 User Role Editor: by Vladimir Garagulya – 4.60.1 User Switching: by John Blackbourn & contributors – 1.5.7 WooCommerce Price Per Unit PRO: by Martin Mechura – 2.1.4 WooCommerce Eway Payment Gateway: by WooCommerce – 3.3.0 WooCommerce Min/Max Quantities: by WooCommerce – 2.4.24 WooCommerce PayPal Payments: by WooCommerce – 1.5.1 WooCommerce Product Table: by Barn2 Plugins – 2.8.7 WOOF - WooCommerce Products Filter: by realmag777 – 1.2.5.6 WooCommerce: by Automattic – 5.6.0 WOOF by Category: by KAGG Design – 2.15 Yoast SEO Premium: by Team Yoast – 16.9 Yoast SEO: by Team Yoast – 16.9 WP Mail SMTP: by WPForms – 3.0.3 WP-Optimize - Clean, Compress, Cache: by David Anderson Ruhani Rabin Team Updraft – 3.1.12 WP Rollback: by impress.org – 1.7.1 Redirection for Contact Form 7: by Query Solutions – 2.3.5 Redirection For Contact Form 7 Extension - Conditional Logic: by Query Solutions – 2.0 Yoast SEO: WooCommerce: by Team Yoast – 14.3 YITH Easy Login & Register Popup For WooCommerce: by YITH – 1.7.4 YITH WooCommerce Bulk Product Editing Premium: by YITH – 1.2.36 YITH WooCommerce Catalog Mode Premium: by YITH – 2.1.5 YITH WooCommerce Request A Quote Premium: by YITH – 3.1.7 Yoast Test Helper: by Team Yoast – 1.14 ### Inactive Plugins (5) ### Limit Login Attempts: by Johan Eenfeldt – 1.7.1 WooCommerce Custom Tag Image: by Digital Mosaic – 1.0.7 WooCommerce Google Analytics Integration: by WooCommerce – 1.5.2 WP-Sweep: by Lester 'GaMerZ' Chan – 1.1.5 YITH WooCommerce Wishlist Premium: by YITH – 3.0.25 ### Dropin Plugins (2) ### db.php: Query Monitor Database Class object-cache.php: Memcached ### Must Use Plugins (1) ### Health Check Troubleshooting Mode: by – 1.7.2 ### Settings ### API Enabled: – Force SSL: – Currency: AUD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: ? ### WC Pages ### Shop base: #258 - /buy-supplies/ Cart: #259 - /cart/ Checkout: #260 - /checkout/ My account: #23676 - /my-account/ Terms and conditions: #15282 - /terms-of-trade/ ### Theme ### Name: Shoptimizer Child Theme Version: 1.2.1 Author URL: Child Theme: ? Parent Theme Name: Shoptimizer Parent Theme Version: 2.4.5 Parent Theme Author URL: https://www.commercegurus.com/ WooCommerce Support: ? ### Templates ### Overrides: – ### WooCommerce PayPal Payments ### Onboarded: Yes Shop country code: AU PayPal card processing available in country: Yes Pay Later messaging available in country: Yes Vault enabled: Yes ### Action Scheduler ### Cancelled: 1 Oldest: 2021-08-04 16:35:46 +1000 Newest: 2021-08-04 16:35:46 +1000 Complete: 23,081 Oldest: 2021-07-23 16:31:47 +1000 Newest: 2021-08-23 09:14:20 +1000 Failed: 8,326 Oldest: 2021-06-22 12:39:42 +1000 Newest: 2021-08-19 18:00:04 +1000 Pending: 4 Oldest: 2021-08-23 09:17:20 +1000 Newest: 2021-08-28 08:00:08 +1000 ### Status report information ### Generated at: 2021-08-23 09:15:31 +10:00
Hi @burner9000,
Thanks for sending over your System Status Report.
Do you see any error logs under WooCommerce > System Status > Logs? If yes, please share it with us as per my previous request. You can paste the logs here or take screenshots with a tool like https://snipboard.io.
You could also perform conflict testing following our guide here: https://docs.woocommerce.com/document/how-to-test-for-conflicts/.
Thanks.
We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if you’re still having the issue
Conflict test nothing found, that fixes the issue, Finding it harder to find the other logs
Hi @burner9000!
Thanks for giving that a go.
I would like to mention that the
meta_form()
is indeed a slow function when you have a large number of entries in the postmeta table, which I assume is the case here.If you’d like you could just entirely remove the metabox from the editor. You can find some code for that here:
https://9seeds.com/wordpress-admin-post-editor-performance/
Is that something that might help?
- The topic ‘Slow queries in the core’ is closed to new replies.