• Resolved belalzekry

    (@belalzekry)


    On my WooCommerce website (I did test 3 themes xstore – flatsome – woodmart) when trying to browse product category page its take long time to load (Note that im using big resources on vps 16 Gb ram – 8 Cpu Core 400 Gb Storage), I did use Query monitor to check my issue i found that

    WP_Query->get_posts()

    wp-includes/class-wp-query.php:3357

    WP_Query->query()

    wp-includes/class-wp-query.php:3852

    WP->query_posts()

    wp-includes/class-wp.php:696

    WP->main()

    wp-includes/class-wp.php:816

    wp() wp-includes/functions.php:1336

    Main Query

    take time to load more than 33 sec

    and this is the log at Query:

    SELECT SQL_CALC_FOUND_ROWS mVkV6_posts.ID

    FROM mVkV6_posts

    LEFT JOIN mVkV6_term_relationships

    ON (mVkV6_posts.ID = mVkV6_term_relationships.object_id)

    INNER JOIN mVkV6_postmeta

    ON ( mVkV6_posts.ID = mVkV6_postmeta.post_id )

    INNER JOIN mVkV6_postmeta AS mt1

    ON ( mVkV6_posts.ID = mt1.post_id )

    WHERE 1=1

    AND ( mVkV6_posts.ID NOT IN (

    SELECT object_id

    FROM mVkV6_term_relationships

    WHERE term_taxonomy_id IN (7,9) )

    AND mVkV6_term_relationships.term_taxonomy_id IN (366) )

    AND ( ( mVkV6_postmeta.meta_key = '_price'

    AND CAST(mVkV6_postmeta.meta_value AS SIGNED) != '' )

    OR ( mt1.meta_key = '_price'

    AND CAST(mt1.meta_value AS SIGNED) != '0' ) )

    AND ((mVkV6_posts.post_type = 'product'

    AND (mVkV6_posts.post_status = 'publish'

    OR mVkV6_posts.post_status = 'wc-shipping'

    OR mVkV6_posts.post_status = 'wc-shipped-status'

    OR mVkV6_posts.post_status = 'private')))

    GROUP BY mVkV6_posts.ID

    ORDER BY mVkV6_posts.menu_order ASC, mVkV6_posts.post_title ASC

    LIMIT 0, 12

    System report

    WordPress Environment<br><br>WordPress address (URL): https://o2care.com.sa<br>Site address (URL): https://o2care.com.sa<br>WC Version: 9.1.4<br>Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.<br>Action Scheduler Version: ? 3.8.1<br>Log Directory Writable: ?<br>WP Version: 6.6.1<br>WP Multisite: –<br>WP Memory Limit: 1,000 MB<br>WP Debug Mode: –<br>WP Cron: ?<br>Language: ar<br>External object cache: – Server Environment<br><br>Server Info: nginx/1.26.1<br>PHP Version: 8.2.22<br>PHP Post Max Size: 1,000 MB<br>PHP Time Limit: 512<br>PHP Max Input Vars: 30000<br>cURL Version: 7.61.1<br>OpenSSL/1.1.1k<br><br>SUHOSIN Installed: –<br>MySQL Version: 10.3.39-MariaDB<br>Max Upload Size: 1,000 MB<br>Default Timezone is UTC: ?<br>fsockopen/cURL: ?<br>SoapClient: ?<br>DOMDocument: ?<br>GZip: ?<br>Multibyte String: ?<br>Remote Post: ?<br>Remote Get: ? Database<br><br>WC Database Version: 9.1.4<br>WC Database Prefix: mVkV6_<br>Total Database Size: 284.60MB<br>Database Data Size: 180.43MB<br>Database Index Size: 104.17MB<br>mVkV6_woocommerce_sessions: Data: 3.50MB + Index: 0.08MB + Engine InnoDB<br>mVkV6_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_woocommerce_order_items: Data: 0.06MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_woocommerce_order_itemmeta: Data: 0.19MB + Index: 0.25MB + Engine InnoDB<br>mVkV6_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>mVkV6_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_actionscheduler_actions: Data: 6.03MB + Index: 11.11MB + Engine InnoDB<br>mVkV6_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_actionscheduler_logs: Data: 4.03MB + Index: 4.03MB + Engine InnoDB<br>mVkV6_aioseo_blc_cache: Data: 1.52MB + Index: 1.80MB + Engine InnoDB<br>mVkV6_aioseo_blc_links: Data: 1.25MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_aioseo_blc_link_status: Data: 0.33MB + Index: 0.08MB + Engine InnoDB<br>mVkV6_aioseo_blc_notifications: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_aioseo_blc_posts: Data: 1.52MB + Index: 0.28MB + Engine InnoDB<br>mVkV6_aioseo_cache: Data: 0.03MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_aioseo_crawl_cleanup_blocked_args: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_aioseo_crawl_cleanup_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_aioseo_notifications: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_aioseo_posts: Data: 13.45MB + Index: 0.41MB + Engine InnoDB<br>mVkV6_barcode_v3_dimension: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_barcode_v3_fields_matching: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_barcode_v3_label_sheets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_barcode_v3_paper_formats: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_barcode_v3_profiles: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_barcode_v3_templates: Data: 0.05MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_barcode_v3_template_to_user: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_barcode_v3_user_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_burst_goals: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_burst_goal_statistics: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_burst_sessions: Data: 0.09MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_burst_statistics: Data: 0.45MB + Index: 0.50MB + Engine InnoDB<br>mVkV6_burst_summary: Data: 0.08MB + Index: 0.17MB + Engine InnoDB<br>mVkV6_chaty_contact_form_leads: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_comments: Data: 0.11MB + Index: 0.09MB + Engine InnoDB<br>mVkV6_digits_auth_devices: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_digits_login_logs: Data: 0.13MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_digits_mobile_otp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_digits_otp: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>mVkV6_digits_request_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>mVkV6_digits_user_session: Data: 1.02MB + Index: 0.13MB + Engine InnoDB<br>mVkV6_ewwwio_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_ewwwio_queue: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_e_notes: Data: 0.02MB + Index: 0.17MB + Engine InnoDB<br>mVkV6_e_notes_users_relations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>mVkV6_e_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB<br>mVkV6_e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB<br>mVkV6_e_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_ff_scheduled_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_draft_submissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_entry_details: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_forms: Data: 0.03MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_form_analytics: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_form_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_order_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_submissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_submission_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_subscriptions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_fluentform_transactions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_ip2location_country_blocker_backend_rate_limit_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_ip2location_country_blocker_frontend_rate_limit_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_jetpack_sync_queue: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_kc_us_clicks: Data: 0.02MB + Index: 0.20MB + Engine InnoDB<br>mVkV6_kc_us_clicks_rotations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_kc_us_domains: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_kc_us_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_kc_us_links: Data: 0.17MB + Index: 0.19MB + Engine InnoDB<br>mVkV6_kc_us_links_groups: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_kc_us_tracking_pixels: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_kc_us_utm_presets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_options: Data: 12.03MB + Index: 1.27MB + Engine InnoDB<br>mVkV6_postmeta: Data: 65.56MB + Index: 56.78MB + Engine InnoDB<br>mVkV6_posts: Data: 30.50MB + Index: 10.00MB + Engine InnoDB<br>mVkV6_po_plugins: Data: 4.52MB + Index: 3.75MB + Engine InnoDB<br>mVkV6_rank_math_404_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_rank_math_internal_links: Data: 0.11MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_rank_math_internal_meta: Data: 0.17MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_revslider_css: Data: 0.13MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_css_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_revslider_sliders: Data: 0.05MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_sliders7: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_sliders_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_slides: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_slides7: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_slides_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_static_slides: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_rm_fields: Data: 0.13MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_front_users: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_login: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_login_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_paypal_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_paypal_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_reports_notifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_rows: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_sent_mails: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_sessions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_stats: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_submissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_submission_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_tabs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_tasks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_rm_task_exe_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_sms_campaign_queue: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_sms_campaign_target_orders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_sms_otp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_sms_otp_attempts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_sms_send: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_sms_subscribes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_sms_subscribes_group: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_sms_woocommerce_cart: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_sms_woocommerce_recovered_cart: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_termmeta: Data: 0.11MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_terms: Data: 0.08MB + Index: 0.09MB + Engine InnoDB<br>mVkV6_term_relationships: Data: 3.27MB + Index: 1.39MB + Engine InnoDB<br>mVkV6_term_taxonomy: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_usermeta: Data: 0.25MB + Index: 0.14MB + Engine InnoDB<br>mVkV6_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>mVkV6_user_registration_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_uwp_form_extras: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_uwp_form_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_uwp_profile_tabs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_uwp_user_sorting: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_viwec_clicked: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wc_admin_notes: Data: 0.11MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wc_admin_note_actions: Data: 0.08MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_wc_orders: Data: 0.05MB + Index: 0.13MB + Engine InnoDB<br>mVkV6_wc_orders_meta: Data: 0.13MB + Index: 0.28MB + Engine InnoDB<br>mVkV6_wc_order_addresses: Data: 0.02MB + Index: 0.08MB + Engine InnoDB<br>mVkV6_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_wc_order_product_lookup: Data: 0.05MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>mVkV6_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wc_product_meta_lookup: Data: 2.33MB + Index: 2.64MB + Engine InnoDB<br>mVkV6_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wfblockediplog: Data: 0.05MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>mVkV6_wfconfig: Data: 3.38MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfcrawlers: Data: 0.11MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wffilemods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfhits: Data: 1.02MB + Index: 0.20MB + Engine InnoDB<br>mVkV6_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_wfknownfilelist: Data: 9.52MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wflogins: Data: 0.44MB + Index: 0.14MB + Engine InnoDB<br>mVkV6_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wfls_role_counts: Data: 0.00MB + Index: 0.00MB + Engine MEMORY<br>mVkV6_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_wfpklist_template_data: Data: 0.11MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfsecurityevents: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>mVkV6_wfstatus: Data: 1.02MB + Index: 0.09MB + Engine InnoDB<br>mVkV6_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wfwaffailures: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wpr_above_the_fold: Data: 0.09MB + Index: 0.06MB + Engine InnoDB<br>mVkV6_wpr_rocket_cache: Data: 1.52MB + Index: 2.78MB + Engine InnoDB<br>mVkV6_wpr_rucss_used_css: Data: 1.03MB + Index: 0.30MB + Engine InnoDB<br>mVkV6_wps_wsfw_wallet_transaction: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wp_phpmyadmin_extension__errors_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_wt_iew_action_history: Data: 0.34MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>mVkV6_wt_sc_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_yith_wcwl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_yith_wcwl_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_yoast_indexable: Data: 4.52MB + Index: 1.00MB + Engine InnoDB<br>mVkV6_yoast_indexable_hierarchy: Data: 0.17MB + Index: 0.28MB + Engine InnoDB<br>mVkV6_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>mVkV6_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>mVkV6_yoast_seo_links: Data: 0.38MB + Index: 0.20MB + Engine InnoDB Post Type Counts<br><br>apifw_inv_templates: 1<br>attachment: 8273<br>custom_css: 1<br>customize_changeset: 57<br>digits-forms-page: 1<br>elementor_library: 17<br>mc4wp-form: 4<br>nav_menu_item: 137<br>page: 37<br>post: 51<br>product: 9874<br>rm_content_editor: 1<br>seedprod: 1<br>shop_coupon: 2<br>shop_order: 52<br>shop_order_refund: 14<br>staticblocks: 14<br>user_registration: 2<br>viwec_template: 28<br>wp_global_styles: 1<br>wpcode: 5<br>yaymail_template: 15 Security<br><br>Secure connection (HTTPS): ?<br>Hide errors from visitors: ? Active Plugins (25)<br><br>Additional SMS Gateways: by UnitedOver – 7.4<br>Cities Shipping Zones for WooCommerce: by Condless – 1.2.7<br>Classic Editor: by WordPress Contributors – 1.6.4<br>DIGITS: WordPress Mobile Number Signup and Login: by UnitedOver – 8.4.3<br>DIGITS: Merge Phone Number Addon: by UnitedOver – 2.3<br>Elementor: by Elementor.com – 3.23.4<br>XStore Core: by 8theme – 5.3.17<br>Flexible Refund and Return Order for WooCommerce: by WP Desk – 1.0.22<br>Loco Translate: by Tim Whitlock – 2.6.11<br>PDF Catalog Woocommerce: by Gravity Master – 2.0<br>PDF Invoices and Packing Slips For WooCommerce: by Acowebs – 1.3.9<br>Product Import Export for WooCommerce: by WebToffee – 2.4.5<br>Slider Revolution: by ThemePunch – 6.7.17<br>Rank Math SEO: by Rank Math – 1.0.225<br>Custom Shipping Plugin: by O2Care – 1.0<br>WooCommerce Tap Payment Gateway: by Waqas Zeeshan – 2.1<br>Checkout Field Editor for WooCommerce: by ThemeHigh – 2.0.3<br>WooCommerce Sort By Stock: by Brandon Yanofsky – 2.2.0<br>WooCommerce: by Automattic – 9.1.4<br>Wordfence Security: by Wordfence – 7.11.7<br>WP Rocket | Force Page Caching: by WP Rocket Support Team –<br>WP Rocket: by WP Media – 3.16.3<br>Smush: by WPMU DEV – 3.16.6<br>Smart Coupons For WooCommerce Coupons: by WebToffee – 1.8.1<br>YayMail - WooCommerce Email Customizer: by YayCommerce – 3.5.4 Inactive Plugins (5)<br><br>Admin Menu Editor: by Janis Elsts – 1.12.4<br>Bulk remove posts from category: by MasterNs – 3.3<br>Index WP MySQL For Speed: by Oliver Jones<br>Rick James – 1.4.18<br><br>Query Monitor: by John Blackbourn – 3.16.4<br>Redis Object Cache: by Till Krüss – 2.5.3 Dropin Plugins ()<br><br>advanced-cache.php: advanced-cache.php<br>maintenance.php: maintenance.php Settings<br><br>API Enabled: –<br>Force SSL: –<br>Currency: SAR (?.?)<br>Currency Position: right<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: –<br>Enforce Approved Product Download Directories: ?<br>HPOS feature enabled: –<br>Order datastore: WC_Order_Data_Store_CPT<br>HPOS data sync enabled: ? Logging<br><br>Enabled: ?<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 833 KB WC Pages<br><br>Shop base: #5 - /shop/<br>Cart: #6 - /cart/ - Contains the [woocommerce_cart] shortcode<br>Checkout: #7 - /checkout/ - Contains the [woocommerce_checkout] shortcode<br>My account: #8 - /my-account/<br>Terms and conditions: #24240 - /%d8%a7%d9%84%d8%b4%d8%b1%d9%88%d8%b7-%d9%88%d8%a7%d9%84%d8%a3%d8%ad%d9%83%d8%a7%d9%85/ Theme<br><br>Name: XStore Child<br>Version: 0.0.1<br>Author URL: https://8theme.com<br>Child Theme: ?<br>Parent Theme Name: Xstore<br>Parent Theme Version: 9.3.17<br>Parent Theme Author URL: https://www.8theme.com<br>WooCommerce Support: ? Templates<br><br>Overrides: xstore/woocommerce/archive-product.php<br>xstore/woocommerce/cart/cart-empty.php<br>xstore/woocommerce/cart/cart-shipping.php<br>xstore/woocommerce/cart/cart.php<br>xstore/woocommerce/cart/cross-sells.php<br>xstore/woocommerce/cart/mini-cart.php<br>xstore/woocommerce/cart/proceed-to-checkout-button.php<br>xstore/woocommerce/checkout/form-billing.php<br>xstore/woocommerce/checkout/form-checkout.php<br>xstore/woocommerce/checkout/form-shipping.php<br>xstore/woocommerce/checkout/review-order.php<br>xstore/woocommerce/checkout/thankyou.php<br>xstore/woocommerce/content-product-cat.php<br>xstore/woocommerce/content-product.php<br>xstore/woocommerce/content-single-product.php<br>xstore/woocommerce/content-widget-product.php<br>xstore/woocommerce/content-widget-reviews.php<br>xstore/woocommerce/global/breadcrumb.php<br>xstore/woocommerce/global/form-login.php<br>xstore/woocommerce/global/wrapper-end.php<br>xstore/woocommerce/global/wrapper-start.php<br>xstore/woocommerce/loop/header.php<br>xstore/woocommerce/loop/loop-end.php<br>xstore/woocommerce/loop/loop-start.php<br>xstore/woocommerce/loop/no-products-found.php<br>xstore/woocommerce/loop/result-count.php<br>xstore/woocommerce/myaccount/dashboard.php<br>xstore/woocommerce/myaccount/form-login.php<br>xstore/woocommerce/myaccount/navigation.php<br>xstore/woocommerce/product-searchform.php<br>xstore/woocommerce/single-product/add-to-cart/simple.php<br>xstore/woocommerce/single-product/meta.php<br>xstore/woocommerce/single-product/product-image.php<br>xstore/woocommerce/single-product/related.php<br>xstore/woocommerce/single-product/tabs/tabs.php<br>xstore/woocommerce/single-product/title.php<br>xstore/woocommerce/single-product/up-sells.php<br>xstore/woocommerce/single-product-reviews.php<br>xstore/woocommerce/single-product.php Admin<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>navigation<br>onboarding<br>onboarding-tasks<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br>launch-your-store<br><br>Disabled Features: experimental-blocks<br>minified-js<br>pattern-toolkit-full-composability<br>product-pre-publish-modal<br>printful<br>settings<br>async-product-editor-category-field<br>product-editor-template-system<br><br>Daily Cron: ? Next scheduled: 2024-08-15 10:25:27 +00:00<br>Options: ?<br>Notes: 143<br>Onboarding: completed Action Scheduler<br><br>Complete: 10,663<br>Oldest: 2024-07-14 14:01:08 +0000<br>Newest: 2024-08-14 13:57:58 +0000<br><br>Failed: 80<br>Oldest: 2023-03-11 08:11:53 +0000<br>Newest: 2024-08-13 04:51:21 +0000<br><br>Pending: 100<br>Oldest: 2024-08-14 13:55:33 +0000<br>Newest: 2024-08-15 06:54:42 +0000 Status report information<br><br>Generated at: 2024-08-14 14:18:38 +00:00<br>
    • This topic was modified 7 months, 1 week ago by belalzekry.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hey there, @belalzekry! Thanks for contacting us. I’m happy to help you.

    I checked some product category pages on your website and it did not take long to load.

    Can you please share some specific URLs where you had this issue so we can check?

    Have you tried on different browsers/devices/internet connection to check if the issue persists?

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter belalzekry

    (@belalzekry)

    Hello, Thanks for you trying to help
    all this report came from query monitor.
    I have 1gb internet speed
    wp-rocket
    vps
    use to many browser, and many agents send me that there is slow on browsing main or submain category or even Product details, and i face that slow most of the day.

    some times website take 2 to 3 seconds to load but most of the day it`s take lot of time.
    i did call wordpress developer and he told me that WP_Query->get_posts() is main issue loading too slow.

    i hope to help me and try to browse web site and im sure that you will face that slow issue

    >>>> Try to use pagination <<<<<
    https://o2care.com.sa/shop/
    on here or any category

    • This reply was modified 7 months, 1 week ago by belalzekry.

    Hey, @belalzekry!

    Thanks for the information.

    I tried https://o2care.com.sa/shop/ and it did take a long time.

    From what I can see you already have a cache plugin set up, correct?

    Can you please run a conflict test to see if something external is interfering with this?

    To test, you’ll first want to change the theme on your site to Storefront, then check to see if the issue is still present. If that resolves the issue, you’ll want to get in touch with your theme’s developer and see if they have an update or fix for you.

    If changing the theme doesn’t help, you’ll want to deactivate all plugins except for WooCommerce and take a look. If that fixes the problem, re-enable the other plugins one by one (gradually), checking after each, to see where the issue is coming from.

    — Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality or you can consider using a service like Jetpack. If something goes wrong, you will be able to restore it.

    — It is important to consider as well a staging functionality in case you would not like to touch your production site (you can ask your host if they offer this service), or you can use WP Staging for quickly spinning up a new test site.

    You can find more about this in this guide.

    Please let us know about your findings.

    Have a wonderful day!

    Thread Starter belalzekry

    (@belalzekry)

    — I already deactivate all plugins before and just let main plugins
    — change theme to store front ( its takes more than xstore theme loading )

    i face same issue

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @belalzekry

    It looks like the WP_Query->get_posts() function is causing the slow load times on your product category pages. This function is used to retrieve posts from your WordPress database and can be slow if you have many products.

    One potential solution could be to optimize your database queries. This could involve limiting the number of posts retrieved by each query, or using a transient to cache the results of your queries. You can also use the Index WP MySQL For Speed plugin.

    You could also consider implementing a lazy loading feature, which only loads images as they come into view on the user’s screen. This can significantly reduce the initial load time of your pages.

    Furthermore, you can disable the Order Attribution feature too. You can find it under WooCommerce > Settings > Advanced > Features. After disabling it, check if it improves the performance.

    I hope this helps! Please let us know how it goes or if you need further assistance.

    Thread Starter belalzekry

    (@belalzekry)

    Im still in the same issue, doing every thing above bot still with same slow page speed
    Is there any additional help here, please ?

    Plugin Contributor Vedanshu – a11n

    (@vedjain)

    Hey @belalzekry ,

    This is essentially a slow query issue, presumably because of number of products/categories that are there on the site. Before we suggest possible options, would you be able to share how many products and variations do you have ?

    If there are a lot of products, then there are plugins that will help in better storing/querying this data, or even export this query to systems such as elastic search.

    Thread Starter belalzekry

    (@belalzekry)

    @vedjain I have more than 5k simple products, and it will be 20k simple products

    • This reply was modified 7 months, 1 week ago by belalzekry.
    • This reply was modified 7 months, 1 week ago by belalzekry.
    Plugin Contributor Vedanshu – a11n

    (@vedjain)

    Ok, that’s not high number of products at all. Are you comfortable with running queries? If so, would you be able to EXPLAIN on the above slow query, like this:

    EXPLAIN SELECT SQL_CALC_FOUND_ROWS mVkV6_posts.ID

    FROM mVkV6_posts

    LEFT JOIN mVkV6_term_relationships

    ON (mVkV6_posts.ID = mVkV6_term_relationships.object_id)

    INNER JOIN mVkV6_postmeta

    ON ( mVkV6_posts.ID = mVkV6_postmeta.post_id )

    INNER JOIN mVkV6_postmeta AS mt1

    ON ( mVkV6_posts.ID = mt1.post_id )

    WHERE 1=1

    AND ( mVkV6_posts.ID NOT IN (

    SELECT object_id

    FROM mVkV6_term_relationships

    WHERE term_taxonomy_id IN (7,9) )

    AND mVkV6_term_relationships.term_taxonomy_id IN (366) )

    AND ( ( mVkV6_postmeta.meta_key = '_price'

    AND CAST(mVkV6_postmeta.meta_value AS SIGNED) != '' )

    OR ( mt1.meta_key = '_price'

    AND CAST(mt1.meta_value AS SIGNED) != '0' ) )

    AND ((mVkV6_posts.post_type = 'product'

    AND (mVkV6_posts.post_status = 'publish'

    OR mVkV6_posts.post_status = 'wc-shipping'

    OR mVkV6_posts.post_status = 'wc-shipped-status'

    OR mVkV6_posts.post_status = 'private')))

    GROUP BY mVkV6_posts.ID

    ORDER BY mVkV6_posts.menu_order ASC, mVkV6_posts.post_title ASC

    LIMIT 0, 12

    It’s basically the same query, EXPLAIN keyword added in front of it. This will tell us what part of the query is slow exactly.

    But let us know if you are not able to run a direct query, in which case, screenshots from query monitor on the slow page will also be very helpful.

    Thread Starter belalzekry

    (@belalzekry)

    @vedjain

    https://prnt.sc/StvP_zmUYVjW

    https://prnt.sc/9_07sr252oxp

    • This reply was modified 7 months, 1 week ago by belalzekry.
    • This reply was modified 7 months, 1 week ago by belalzekry.
    Thread Starter belalzekry

    (@belalzekry)

    @vedjain Please don`t forget to help me on my issue

    Plugin Contributor Vedanshu – a11n

    (@vedjain)

    Thanks for the screenshots, I am seeing some clauses that are not added by WooCommerce core, such as private, wc-shipping, wc-refund-request and wc-shipping-status. They might be getting added by a plugin, and if this query is happening on every page, it will definately slow down the site immensly.

    Do you know where might these be getting added from? Perhaps doing a plugin conflict test like this will help -> https://woocommerce.com/document/how-to-test-for-conflicts/.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WP_Query->get_posts() load on 33 sec’ is closed to new replies.