• Resolved edat

    (@edat)


    Hi Guys

    Every time I try to do anything with Woocommerce in the back end (i.e. View Product list, edit a product, View Orders, edit an order) Woocommerce is running the following SQL 4 times and each time its taking around 10 seconds.

    WP_Query->get_posts()

    SELECT wp_posts.ID
    FROM wp_posts
    LEFT JOIN wp_term_relationships
    ON (wp_posts.ID = wp_term_relationships.object_id)
    INNER JOIN wp_postmeta
    ON ( wp_posts.ID = wp_postmeta.post_id )
    WHERE 1=1
    AND ( wp_term_relationships.term_taxonomy_id IN (2,3,4,5,1400,1417) )
    AND ( ( wp_postmeta.meta_key = '_virtual'
    AND wp_postmeta.meta_value = 'no' ) )
    AND wp_posts.post_type = 'product'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'draft'
    OR wp_posts.post_status = 'pending'
    OR wp_posts.post_status = 'private'))
    GROUP BY wp_posts.ID
    ORDER BY wp_posts.post_date DESC
    LIMIT 0, 1

    It’s becoming almost unusable as that SQL can be running up to 4 times simultaneously.

    Could some one please help me. I feel this has only recently started happening with updates to Woocommerce.

    Below Are my Site details

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://mysite.com
    Site address (URL): https://mysite.com
    WC Version: 6.7.0
    REST API Version: ✔ 6.7.0
    WC Blocks Version: ✔ 7.8.3
    Action Scheduler Version: ✔ 3.4.0
    Log Directory Writable: ✔
    WP Version: 6.0.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_AU
    External object cache: ✔
    
    ### Server Environment ###
    
    Server Info: nginx/1.22.0
    PHP Version: 8.0.21
    PHP Post Max Size: 64 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.68.0
    OpenSSL/1.1.1f
    
    SUHOSIN Installed: –
    MySQL Version: 10.4.25-MariaDB-1:10.4.25+maria~focal
    Max Upload Size: 64 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 6.7.0
    WC Database Prefix: wp_
    Total Database Size: 560.00MB
    Database Data Size: 418.98MB
    Database Index Size: 141.02MB
    wp_woocommerce_sessions: Data: 2.52MB + Index: 0.05MB + 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.45MB + Index: 0.16MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 3.52MB + Index: 3.03MB + 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.02MB + Index: 0.03MB + 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
    wp_actionscheduler_actions: Data: 0.02MB + Index: 0.13MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 1.52MB + Index: 0.50MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 56.58MB + Index: 20.03MB + Engine InnoDB
    wp_ac_abandoned_cart_history_lite: Data: 0.13MB + Index: 0.00MB + Engine InnoDB
    wp_ac_email_templates_lite: Data: 0.03MB + Index: 0.00MB + Engine InnoDB
    wp_ac_guest_abandoned_cart_history_lite: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_ac_sent_history_lite: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_aws_cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_aws_index: Data: 32.55MB + Index: 0.00MB + Engine InnoDB
    wp_commentmeta: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
    wp_comments: Data: 1.52MB + Index: 0.98MB + Engine InnoDB
    wp_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_gdbc_attempts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_gglcptch_allowlist: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_gla_budget_recommendations: Data: 0.20MB + Index: 0.11MB + Engine InnoDB
    wp_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_gla_shipping_rates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_options: Data: 3.47MB + Index: 0.14MB + Engine InnoDB
    wp_pimwick_gift_card: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_pimwick_gift_card_activity: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_postmeta: Data: 188.67MB + Index: 72.19MB + Engine InnoDB
    wp_posts: Data: 34.56MB + Index: 6.06MB + Engine InnoDB
    wp_ppress_forms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_ppress_formsmeta: Data: 0.06MB + Index: 0.05MB + Engine InnoDB
    wp_ppress_meta_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_redirection_404: Data: 0.36MB + Index: 0.11MB + Engine InnoDB
    wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_redirection_items: Data: 0.11MB + Index: 0.16MB + Engine InnoDB
    wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_revslider_css: Data: 0.13MB + Index: 0.02MB + Engine InnoDB
    wp_revslider_css_bkp: Data: 0.13MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_sliders: Data: 0.31MB + Index: 0.02MB + Engine InnoDB
    wp_revslider_sliders_bkp: Data: 1.50MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_slides: Data: 4.52MB + Index: 0.02MB + Engine InnoDB
    wp_revslider_slides_bkp: Data: 8.52MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_static_slides: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_termmeta: Data: 1.52MB + Index: 0.52MB + Engine InnoDB
    wp_terms: Data: 0.22MB + Index: 0.19MB + Engine InnoDB
    wp_term_relationships: Data: 5.52MB + Index: 3.52MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.31MB + Index: 0.23MB + 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: 3.52MB + Index: 0.88MB + Engine InnoDB
    wp_users: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Data: 0.13MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 0.19MB + Index: 0.14MB + 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.30MB + Index: 0.30MB + Engine InnoDB
    wp_wc_order_stats: Data: 0.22MB + Index: 0.20MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.14MB + Index: 0.13MB + Engine InnoDB
    wp_wc_product_attributes_lookup: Data: 0.09MB + Index: 0.08MB + Engine InnoDB
    wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 2.52MB + Index: 3.41MB + Engine InnoDB
    wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + 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_wdr_order_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wdr_order_item_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wdr_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfblockediplog: Data: 0.20MB + Index: 0.00MB + Engine InnoDB
    wp_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wfconfig: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wffilemods: Data: 8.52MB + Index: 0.00MB + Engine InnoDB
    wp_wfhits: Data: 1.52MB + Index: 0.17MB + Engine InnoDB
    wp_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wfknownfilelist: Data: 6.52MB + Index: 0.00MB + Engine InnoDB
    wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wflogins: Data: 0.41MB + Index: 0.13MB + Engine InnoDB
    wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfnotifications: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wfstatus: Data: 0.13MB + Index: 0.09MB + Engine InnoDB
    wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woodmart_wishlists: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woodmart_wishlist_products: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_yith_wcwl: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
    wp_yith_wcwl_lists: Data: 0.09MB + Index: 0.11MB + Engine InnoDB
    wp_ymm: Data: 9.28MB + Index: 5.88MB + Engine MyISAM
    wp_yoast_indexable: Data: 23.55MB + Index: 10.09MB + Engine InnoDB
    wp_yoast_indexable_hierarchy: Data: 3.52MB + Index: 4.55MB + Engine InnoDB
    wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yoast_primary_term: Data: 0.36MB + Index: 0.31MB + Engine InnoDB
    wp_yoast_prominent_words: Data: 2.52MB + Index: 4.55MB + Engine InnoDB
    wp_yoast_seo_links: Data: 1.52MB + Index: 0.47MB + Engine InnoDB
    wp_yoast_seo_meta: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 10506
    cms_block: 142
    mc4wp-form: 1
    nav_menu_item: 116
    oembed_cache: 23
    page: 34
    post: 62
    product: 9745
    product_variation: 4520
    revision: 2
    shop_coupon: 14
    shop_order: 1774
    shop_order_refund: 108
    shop_quote: 23
    vc_settings_preset: 1
    woo_discount: 2
    woo_discount_cart: 2
    woodmart_sidebar: 2
    woodmart_size_guide: 30
    woodmart_slide: 22
    wpcf7_contact_form: 10
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (46) ###
    
    Query Monitor: by John Blackbourn – 3.9.0
    WPBruiser: by Mihai Chelaru – 3.1.43
    Admin Custom Login: by Weblizar – 3.4.2
    Afterpay Gateway for WooCommerce: by Afterpay – 3.4.2
    Payment Gateway Based Fees and Discounts for WooCommerce: by Tyche Softwares – 2.7.0
    Classic Editor: by WordPress Contributors – 1.6.2
    Cloudflare: by Cloudflare
    Inc. – 4.10.1
    
    Contact Form 7: by Takayuki Miyoshi – 5.6.1
    Disable Gutenberg: by Jeff Starr – 2.7
    Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 4.5
    Enable Media Replace: by ShortPixel – 3.6.3
    Envato Market: by Envato – 2.0.7
    Facebook for WooCommerce: by Facebook – 2.6.18
    reCaptcha by BestWebSoft: by BestWebSoft – 1.67
    Current Year and Copyright Shortcodes: by David Gewirtz – 1.0.2
    WPBakery Page Builder: by Michael M - WPBakery.com – 6.9.0
    MC4WP: Mailchimp for WordPress: by ibericode – 4.8.7
    Maintenance: by WebFactory Ltd – 4.06
    PixelYourSite: by PixelYourSite – 9.1.1
    PW WooCommerce Gift Cards: by Pimwick
    LLC – 1.215
    
    Redirection: by John Godley – 5.3.0
    Slider Revolution: by ThemePunch – 6.5.25
    Safe SVG: by 10up – 2.0.2
    Simple Revisions Delete by bweb: by Brice CAPOBIANCO – 1.5.1
    SpinupWP: by SpinupWP – 1.4.2
    TinyPNG - JPEG, PNG & WebP image compression: by TinyPNG – 3.4
    Widget CSS Classes: by Jory Hogeveen – 1.5.4.1
    Widget Options: by Widget Options Team – 3.8.5
    Woo Discount Rules PRO 2.0: by Flycart – 2.4.3
    Woo Discount Rules: by Flycart – 2.4.3
    WPC Product Bundles for WooCommerce: by WPClever – 6.3.5
    Codisto Channel Cloud: by Codisto – 1.3.65
    WooCommerce Stripe Gateway: by WooCommerce – 6.4.3
    WooCommerce Google Analytics Integration: by WooCommerce – 1.5.11
    WooCommerce Table Rate Shipping: by Bolder Elements – 4.3.5
    WooCommerce: by Automattic – 6.7.0
    Woodmart Core: by  – 1.0.34
    Wordfence Security: by Wordfence – 7.5.11
    Yoast SEO Premium: by Team Yoast – 18.9
    Yoast SEO: by Team Yoast – 19.3
    WP Add Mime Types: by Kimiya Kitani – 3.0.3
    WP File Manager: by mndpsingh287 – 7.1.6
    WP Mail SMTP: by WPForms – 3.5.1
    WP Rollback: by impress.org – 1.7.1
    YMM Search: by Pektsekye – 1.0.10
    Zip - WooCommerce: by Zip – 2.3.13
    
    ### Inactive Plugins (2) ###
    
    Abandoned Cart Lite for WooCommerce: by Tyche Softwares – 5.12.0
    WP-Optimize - Clean, Compress, Cache: by David Anderson
    Ruhani Rabin
    Team Updraft – 3.2.6
    
    ### Dropin Plugins (2) ###
    
    db.php: Query Monitor Database Class (Drop-in)
    object-cache.php: SpinupWP Redis Object Cache Drop-In
    
    ### Must Use Plugins (1) ###
    
    SpinupWP Debug Log Path: by Delicious Brains – 1.0
    
    ### 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)
    pw gift card (pw-gift-card)
    simple (simple)
    variable (variable)
    woosb (woosb)
    
    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: ✔
    Enforce Approved Product Download Directories: –
    
    ### WC Pages ###
    
    Shop base: #8 - /shop/
    Cart: #9 - /cart/
    Checkout: #10 - /checkout/
    My account: #11 - /my-account/
    Terms and conditions: ❌ Page not set
    
    ### Theme ###
    
    Name: Woodmart Child
    Version: 1.0.0
    Author URL: http://xtemos.com
    Child Theme: ✔
    Parent Theme Name: Woodmart
    Parent Theme Version: 6.5.4
    Parent Theme Author URL: http://themeforest.net/user/xtemos
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: woodmart-child/woocommerce/archive-product.php
    woodmart/woocommerce/cart/cart-item-data.php
    woodmart/woocommerce/cart/cart.php
    woodmart/woocommerce/cart/cross-sells.php
    woodmart/woocommerce/cart/mini-cart.php
    woodmart/woocommerce/checkout/form-checkout.php
    woodmart/woocommerce/checkout/thankyou.php
    woodmart/woocommerce/content-product-cat.php
    woodmart/woocommerce/content-product.php
    woodmart/woocommerce/content-single-product.php
    woodmart/woocommerce/content-widget-product.php
    woodmart-child/woocommerce/emails/customer-completed-order.php
    woodmart/woocommerce/global/breadcrumb.php
    woodmart/woocommerce/global/form-login.php
    woodmart/woocommerce/global/quantity-input.php
    woodmart/woocommerce/loop/add-to-cart.php
    woodmart/woocommerce/loop/loop-end.php
    woodmart/woocommerce/loop/loop-start.php
    woodmart/woocommerce/loop/no-products-found.php
    woodmart/woocommerce/loop/orderby.php
    woodmart/woocommerce/loop/pagination.php
    woodmart/woocommerce/loop/sale-flash.php
    woodmart/woocommerce/myaccount/form-login.php
    woodmart/woocommerce/product-searchform.php
    woodmart/woocommerce/single-product/add-to-cart/grouped.php
    woodmart/woocommerce/single-product/add-to-cart/variable.php
    woodmart/woocommerce/single-product/meta.php
    woodmart/woocommerce/single-product/product-attributes.php
    woodmart/woocommerce/single-product/product-image.php
    woodmart/woocommerce/single-product/product-thumbnails.php
    woodmart/woocommerce/single-product/rating.php
    woodmart/woocommerce/single-product/related.php
    woodmart/woocommerce/single-product/sale-flash.php
    woodmart/woocommerce/single-product/tabs/description.php
    woodmart/woocommerce/single-product/tabs/tabs.php
    woodmart/woocommerce/single-product/title.php
    woodmart/woocommerce/single-product/up-sells.php
    woodmart/woocommerce/single-product.php
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    experimental-products-task
    experimental-import-products-task
    experimental-fashion-sample-products
    experimental-product-tour
    homescreen
    marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    wc-pay-promotion
    wc-pay-welcome-page
    wc-pay-subscriptions-page
    
    Disabled Features: minified-js
    settings
    
    Daily Cron: ✔ Next scheduled: 2022-07-26 08:06:31 +10:00
    Options: ✔
    Notes: 55
    Onboarding: completed
    
    ### Action Scheduler ###
    
    Complete: 6
    Oldest: 2022-07-25 23:48:22 +1000
    Newest: 2022-07-26 00:19:27 +1000
    
    Pending: 5
    Oldest: 2022-07-26 03:15:26 +1000
    Newest: 2022-07-26 21:23:48 +1000
    
    ### Status report information ###
    
    Generated at: 2022-07-26 00:37:45 +10:00
    
Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter edat

    (@edat)

    If it’s any help this is the caller each of the 4 times it’s run as per the report from Query Monitor.

    WP_Query->get_posts()
    wp-includes/class-wp-query.php:3129
    WP_Query->query()
    wp-includes/class-wp-query.php:3586
    WP_Query->__construct()
    wp-includes/class-wp-query.php:3718
    WC_Product_Data_Store_CPT->query()
    wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:2042
    WC_Data_Store->__call()
    wp-content/plugins/woocommerce/includes/class-wc-data-store.php:207
    WC_Product_Query->get_products()
    wp-content/plugins/woocommerce/includes/class-wc-product-query.php:76
    wc_get_products()
    wp-content/plugins/woocommerce/includes/wc-product-functions.php:48
    Automattic\W\A\F\O\T\Shipping::has_physical_products()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Shipping.php:114
    Automattic\W\A\F\O\T\Shipping->can_view()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Shipping.php:78
    Automattic\W\A\F\O\TaskList->Automattic\W\A\F\O\{closure}()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php:299
    array_filter()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php:299
    Automattic\W\A\F\O\TaskList->get_viewable_tasks()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php:300
    Automattic\W\A\F\O\TaskList->is_visible()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php:174
    Automattic\W\A\F\O\TaskLists::Automattic\W\A\F\O\{closure}()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php:414
    array_filter()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php:414
    Automattic\W\A\F\O\TaskLists::get_visible()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php:415
    Automattic\W\A\F\O\TaskLists::task_list_preloaded_settings()
    wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php:523
    apply_filters('woocommerce_admin_shared_settings')
    wp-includes/plugin.php:191
    Automattic\W\I\A\WCAdminSharedSettings->Automattic\W\I\A\{closure}()
    wp-content/plugins/woocommerce/src/Internal/Admin/WCAdminSharedSettings.php:61
    Automattic\W\B\A\AssetDataRegistry->execute_lazy_data()
    wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php:258
    Automattic\W\B\A\AssetDataRegistry->enqueue_asset_data()
    wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php:359
    do_action('admin_print_footer_scripts')
    wp-includes/plugin.php:476
    • This reply was modified 3 years, 10 months ago by edat.

    Hi @edat

    Thanks for sharing the error logs and the System Status Report.

    It is not clear why the SQL is running multiple times and thus causing things to slow down.

    Per the system report, the following parameters seem to be a bit low. As a preliminary step, could you please increase these to see if that makes a difference?

    PHP Time Limit: 30 → Increase it to 1200
    PHP Max Input Vars: 1000 → Increase it to 5000
    PHP Post Max Size: 64 MB → As much as possible within the limits of WP Memory Limit of 512 MB

    Thread Starter edat

    (@edat)

    Hi,

    I rolled back to WC6.6.1 and the Admin area has become more responsive.

    I’m no longer seeing those 4 SQL get executed.

    I also made those changes to PHP as per your suggestion.

    However now my WC Data Base is reporting as v6.7 and not v6.6.1

    Is there anything that I need to do to fix it or can it stay like that?

    Also here is the latest system report.

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://mysite.com
    Site address (URL): https://mysite.com
    WC Version: 6.6.1
    REST API Version: ✔ 6.6.1
    WC Blocks Version: ✔ 7.6.2
    Action Scheduler Version: ✔ 3.4.0
    Log Directory Writable: ✔
    WP Version: 6.0.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_AU
    External object cache: ✔
    
    ### Server Environment ###
    
    Server Info: nginx/1.22.0
    PHP Version: 8.0.21
    PHP Post Max Size: 512 MB
    PHP Time Limit: 1200
    PHP Max Input Vars: 5000
    cURL Version: 7.68.0
    OpenSSL/1.1.1f
    
    SUHOSIN Installed: –
    MySQL Version: 10.4.25-MariaDB-1:10.4.25+maria~focal
    Max Upload Size: 64 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 6.7.0
    WC Database Prefix: wp_
    Total Database Size: 559.98MB
    Database Data Size: 418.94MB
    Database Index Size: 141.04MB
    wp_woocommerce_sessions: Data: 2.52MB + Index: 0.05MB + 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.45MB + Index: 0.16MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 3.52MB + Index: 3.03MB + 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.02MB + Index: 0.03MB + 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
    wp_actionscheduler_actions: Data: 0.02MB + Index: 0.13MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 1.52MB + Index: 0.50MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 56.58MB + Index: 20.03MB + Engine InnoDB
    wp_ac_abandoned_cart_history_lite: Data: 0.13MB + Index: 0.00MB + Engine InnoDB
    wp_ac_email_templates_lite: Data: 0.03MB + Index: 0.00MB + Engine InnoDB
    wp_ac_guest_abandoned_cart_history_lite: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_ac_sent_history_lite: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_aws_cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_aws_index: Data: 32.55MB + Index: 0.00MB + Engine InnoDB
    wp_commentmeta: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
    wp_comments: Data: 1.52MB + Index: 0.98MB + Engine InnoDB
    wp_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_gdbc_attempts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_gglcptch_allowlist: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_gla_budget_recommendations: Data: 0.20MB + Index: 0.11MB + Engine InnoDB
    wp_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_gla_shipping_rates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_options: Data: 3.47MB + Index: 0.16MB + Engine InnoDB
    wp_pimwick_gift_card: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_pimwick_gift_card_activity: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_postmeta: Data: 188.67MB + Index: 72.19MB + Engine InnoDB
    wp_posts: Data: 34.56MB + Index: 6.06MB + Engine InnoDB
    wp_ppress_forms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_ppress_formsmeta: Data: 0.06MB + Index: 0.05MB + Engine InnoDB
    wp_ppress_meta_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_redirection_404: Data: 0.36MB + Index: 0.11MB + Engine InnoDB
    wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_redirection_items: Data: 0.11MB + Index: 0.16MB + Engine InnoDB
    wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_revslider_css: Data: 0.13MB + Index: 0.02MB + Engine InnoDB
    wp_revslider_css_bkp: Data: 0.13MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_sliders: Data: 0.31MB + Index: 0.02MB + Engine InnoDB
    wp_revslider_sliders_bkp: Data: 1.50MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_slides: Data: 4.52MB + Index: 0.02MB + Engine InnoDB
    wp_revslider_slides_bkp: Data: 8.52MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_static_slides: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_termmeta: Data: 1.52MB + Index: 0.52MB + Engine InnoDB
    wp_terms: Data: 0.22MB + Index: 0.19MB + Engine InnoDB
    wp_term_relationships: Data: 5.52MB + Index: 3.52MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.31MB + Index: 0.23MB + 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: 3.52MB + Index: 0.88MB + Engine InnoDB
    wp_users: Data: 0.08MB + 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.13MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 0.19MB + Index: 0.14MB + 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.30MB + Index: 0.30MB + Engine InnoDB
    wp_wc_order_stats: Data: 0.22MB + Index: 0.20MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.14MB + Index: 0.13MB + Engine InnoDB
    wp_wc_product_attributes_lookup: Data: 0.09MB + Index: 0.08MB + Engine InnoDB
    wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 2.52MB + Index: 3.41MB + Engine InnoDB
    wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + 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_wdr_order_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wdr_order_item_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wdr_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfblockediplog: Data: 0.20MB + Index: 0.00MB + Engine InnoDB
    wp_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wfconfig: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wffilemods: Data: 8.52MB + Index: 0.00MB + Engine InnoDB
    wp_wfhits: Data: 1.52MB + Index: 0.17MB + Engine InnoDB
    wp_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wfknownfilelist: Data: 6.52MB + Index: 0.00MB + Engine InnoDB
    wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wflogins: Data: 0.41MB + Index: 0.13MB + Engine InnoDB
    wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfnotifications: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wfstatus: Data: 0.13MB + Index: 0.09MB + Engine InnoDB
    wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woodmart_wishlists: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woodmart_wishlist_products: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_yith_wcwl: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
    wp_yith_wcwl_lists: Data: 0.09MB + Index: 0.11MB + Engine InnoDB
    wp_ymm: Data: 9.28MB + Index: 5.88MB + Engine MyISAM
    wp_yoast_indexable: Data: 23.55MB + Index: 10.09MB + Engine InnoDB
    wp_yoast_indexable_hierarchy: Data: 3.52MB + Index: 4.55MB + Engine InnoDB
    wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yoast_primary_term: Data: 0.36MB + Index: 0.31MB + Engine InnoDB
    wp_yoast_prominent_words: Data: 2.52MB + Index: 4.55MB + Engine InnoDB
    wp_yoast_seo_links: Data: 1.52MB + Index: 0.47MB + Engine InnoDB
    wp_yoast_seo_meta: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 10506
    cms_block: 142
    mc4wp-form: 1
    nav_menu_item: 116
    oembed_cache: 23
    page: 34
    post: 62
    product: 9745
    product_variation: 4520
    revision: 2
    shop_coupon: 14
    shop_order: 1774
    shop_order_refund: 108
    shop_quote: 23
    vc_settings_preset: 1
    woo_discount: 2
    woo_discount_cart: 2
    woodmart_sidebar: 2
    woodmart_size_guide: 30
    woodmart_slide: 22
    wpcf7_contact_form: 10
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (46) ###
    
    Query Monitor: by John Blackbourn – 3.9.0
    WPBruiser: by Mihai Chelaru – 3.1.43
    Admin Custom Login: by Weblizar – 3.4.2
    Afterpay Gateway for WooCommerce: by Afterpay – 3.4.2
    Payment Gateway Based Fees and Discounts for WooCommerce: by Tyche Softwares – 2.7.0
    Classic Editor: by WordPress Contributors – 1.6.2
    Cloudflare: by Cloudflare
    Inc. – 4.10.1
    
    Contact Form 7: by Takayuki Miyoshi – 5.6.1
    Disable Gutenberg: by Jeff Starr – 2.7
    Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 4.5
    Enable Media Replace: by ShortPixel – 3.6.3
    Envato Market: by Envato – 2.0.7
    Facebook for WooCommerce: by Facebook – 2.6.18
    reCaptcha by BestWebSoft: by BestWebSoft – 1.67
    Current Year and Copyright Shortcodes: by David Gewirtz – 1.0.2
    WPBakery Page Builder: by Michael M - WPBakery.com – 6.9.0
    MC4WP: Mailchimp for WordPress: by ibericode – 4.8.7
    Maintenance: by WebFactory Ltd – 4.06
    PixelYourSite: by PixelYourSite – 9.1.1
    PW WooCommerce Gift Cards: by Pimwick
    LLC – 1.215
    
    Redirection: by John Godley – 5.3.0
    Slider Revolution: by ThemePunch – 6.5.25
    Safe SVG: by 10up – 2.0.2
    Simple Revisions Delete by bweb: by Brice CAPOBIANCO – 1.5.1
    SpinupWP: by SpinupWP – 1.4.2
    TinyPNG - JPEG, PNG & WebP image compression: by TinyPNG – 3.4
    Widget CSS Classes: by Jory Hogeveen – 1.5.4.1
    Widget Options: by Widget Options Team – 3.8.5
    Woo Discount Rules PRO 2.0: by Flycart – 2.4.3
    Woo Discount Rules: by Flycart – 2.4.3
    WPC Product Bundles for WooCommerce: by WPClever – 6.3.5
    Codisto Channel Cloud: by Codisto – 1.3.65
    WooCommerce Stripe Gateway: by WooCommerce – 6.4.3
    WooCommerce Google Analytics Integration: by WooCommerce – 1.5.11
    WooCommerce Table Rate Shipping: by Bolder Elements – 4.3.5
    WooCommerce: by Automattic – 6.6.1 (update to version 6.7.0 is available)
    Woodmart Core: by  – 1.0.34
    Wordfence Security: by Wordfence – 7.5.11
    Yoast SEO Premium: by Team Yoast – 18.9
    Yoast SEO: by Team Yoast – 19.3
    WP Add Mime Types: by Kimiya Kitani – 3.0.3
    WP File Manager: by mndpsingh287 – 7.1.6
    WP Mail SMTP: by WPForms – 3.5.1
    WP Rollback: by impress.org – 1.7.1
    YMM Search: by Pektsekye – 1.0.10
    Zip - WooCommerce: by Zip – 2.3.13
    
    ### Inactive Plugins (2) ###
    
    Abandoned Cart Lite for WooCommerce: by Tyche Softwares – 5.12.0
    WP-Optimize - Clean, Compress, Cache: by David Anderson
    Ruhani Rabin
    Team Updraft – 3.2.6
    
    ### Dropin Plugins (2) ###
    
    db.php: Query Monitor Database Class (Drop-in)
    object-cache.php: SpinupWP Redis Object Cache Drop-In
    
    ### Must Use Plugins (1) ###
    
    SpinupWP Debug Log Path: by Delicious Brains – 1.0
    
    ### 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)
    pw gift card (pw-gift-card)
    simple (simple)
    variable (variable)
    woosb (woosb)
    
    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: ✔
    Enforce Approved Product Download Directories: –
    
    ### WC Pages ###
    
    Shop base: #8 - /shop/
    Cart: #9 - /cart/
    Checkout: #10 - /checkout/
    My account: #11 - /my-account/
    Terms and conditions: ❌ Page not set
    
    ### Theme ###
    
    Name: Woodmart Child
    Version: 1.0.0
    Author URL: http://xtemos.com
    Child Theme: ✔
    Parent Theme Name: Woodmart
    Parent Theme Version: 6.5.4
    Parent Theme Author URL: http://themeforest.net/user/xtemos
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: woodmart-child/woocommerce/archive-product.php
    woodmart/woocommerce/cart/cart-item-data.php
    woodmart/woocommerce/cart/cart.php
    woodmart/woocommerce/cart/cross-sells.php
    woodmart/woocommerce/cart/mini-cart.php
    woodmart/woocommerce/checkout/form-checkout.php
    woodmart/woocommerce/checkout/thankyou.php
    woodmart/woocommerce/content-product-cat.php
    woodmart/woocommerce/content-product.php
    woodmart/woocommerce/content-single-product.php
    woodmart/woocommerce/content-widget-product.php
    woodmart-child/woocommerce/emails/customer-completed-order.php
    woodmart/woocommerce/global/breadcrumb.php
    woodmart/woocommerce/global/form-login.php
    woodmart/woocommerce/global/quantity-input.php
    woodmart/woocommerce/loop/add-to-cart.php
    woodmart/woocommerce/loop/loop-end.php
    woodmart/woocommerce/loop/loop-start.php
    woodmart/woocommerce/loop/no-products-found.php
    woodmart/woocommerce/loop/orderby.php
    woodmart/woocommerce/loop/pagination.php
    woodmart/woocommerce/loop/sale-flash.php
    woodmart/woocommerce/myaccount/form-login.php
    woodmart/woocommerce/product-searchform.php
    woodmart/woocommerce/single-product/add-to-cart/grouped.php
    woodmart/woocommerce/single-product/add-to-cart/variable.php
    woodmart/woocommerce/single-product/meta.php
    woodmart/woocommerce/single-product/product-attributes.php
    woodmart/woocommerce/single-product/product-image.php
    woodmart/woocommerce/single-product/product-thumbnails.php
    woodmart/woocommerce/single-product/rating.php
    woodmart/woocommerce/single-product/related.php
    woodmart/woocommerce/single-product/sale-flash.php
    woodmart/woocommerce/single-product/tabs/description.php
    woodmart/woocommerce/single-product/tabs/tabs.php
    woodmart/woocommerce/single-product/title.php
    woodmart/woocommerce/single-product/up-sells.php
    woodmart/woocommerce/single-product.php
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    experimental-products-task
    experimental-import-products-task
    experimental-fashion-sample-products
    homescreen
    marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    wc-pay-promotion
    wc-pay-welcome-page
    wc-pay-subscriptions-page
    
    Disabled Features: minified-js
    settings
    
    Daily Cron: ✔ Next scheduled: 2022-07-26 08:06:31 +10:00
    Options: ✔
    Notes: 23
    Onboarding: completed
    
    ### Action Scheduler ###
    
    Complete: 9
    Oldest: 2022-07-25 23:48:22 +1000
    Newest: 2022-07-26 01:17:26 +1000
    
    Pending: 5
    Oldest: 2022-07-26 03:15:26 +1000
    Newest: 2022-07-26 21:23:48 +1000
    
    ### Status report information ###
    
    Generated at: 2022-07-26 01:48:03 +10:00
    
    • This reply was modified 3 years, 10 months ago by edat.

    Hello,

    …Woocommerce is running the following SQL 4 times and each time its taking around 10 seconds.


    Link to image: https://snipboard.io/G6Cc28.jpg

    I was checking and the query is running properly on my testing site using WordPress (6.0.1), WooCommerce (6.7.0), MySQL (8.0.16), and WC database (6.7.0).

    However now my WC Data Base is reporting as v6.7 and not v6.6.1

    Before moving forward we’d like to get more information are you using any custom code to run the SQL query 4 times? Can you describe the steps made on your site to run the query 4 times?

    Let us know.

    Thread Starter edat

    (@edat)

    No custom code, the reason I say it’s running 4 times is because that’s how times it shows up in the Query Monitor (plugin – https://en-au.ww.wp.xz.cn/plugins/query-monitor/)

    It can trigger the SQL every time do anything on Admin side of the site that has to do with Woocommerce. So for example opening the list of products, Product => All Products.

    Or clicking on Edit for one of the products. Or Opening the list of Orders Woocommerce => Orders.

    This is image is from WC6.6.1 but show the SQL I’m seeing but 4 times over and running around 10 – 15seconds for each one.

    https://snipboard.io/v5FLzG.jpg

    Hi @edat

    It looks like there may be several tasks pending in the task list on the WooCommerce “Home” screen in your WP Admin. These are likely creating the additional database queries.

    Do the queries still run (and run slowly) once all tasks in the task list are completed?

    As an additional peace of mind, when running repeats of the same query, your WordPress will pick up data from it’s object cache, instead of querying your database directly. I see you have an object cache plugin installed, which facilitates this.

    object-cache.php: SpinupWP Redis Object Cache Drop-In

    Thread Starter edat

    (@edat)

    What tasks pending? I dont see what you’re talking about.

    Also is there a way to roll back the data base version to 6.6.1 form 6.7?

    I used a Rollback plugin to go back to WC6.6.1

    > What tasks pending? I dont see what you’re talking about.

    If there are tasks pending, they will be at /wp-admin/admin.php?page=wc-admin at your store. From Query Monitor, it looks like there are several tasks which may be done, though need their checkbox checked to be marked as complete (removing the additional queries being run).

    > Also is there a way to roll back the data base version to 6.6.1 form 6.7?

    There is a way to adjust the WooCommerce database version number, though it shouldn’t be necessary and shouldn’t be blocking your store from running.

    There is a list of all database options at /wp-admin/options.php. This is a last-resort approach, used only if the WooCommerce version number is blocking your store from running.

    On the /wp-admin/options.php screen, search for “woocommerce_db_version” and adjust it to 6.6.1, clicking “Save Changes” at the bottom.

    Thread Starter edat

    (@edat)

    Thanks Guys

    Looks like I’ve been able to get it running back to normal.

    What I did was turn off all the Woocommerce plugins, then I updated again from 6.6.1 to 6.7, then I activated all the plugins again once WC had updated.

    I then check again with Query Monitor and I’m still seeing multiple calls but they are only taking sub 1second to run this time.

    I call this one solved, it was a bit of weird one, thanks for all your suggestions.

    Hello,

    Glad to hear that, that sounds like good news. If you have a few minutes, we’d love it if you could share your experience with the community by leaving a review: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/

    Best.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Very Slow SQL When WP_Query->get_posts() is Executed’ is closed to new replies.