website is too slow when this plugin active
-
this is the slowest sql, it costed 4.3238670825958 second, is there a good solution for this question?
[4]=>
array(5) {
[0]=>
string(1363) “SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON ( wp_posts.ID = mt2.post_id ) LEFT JOIN wp_postmeta AS mt3 ON ( wp_posts.ID = mt3.post_id ) LEFT JOIN wp_postmeta AS mt4 ON ( wp_posts.ID = mt4.post_id ) LEFT JOIN wp_postmeta AS mt5 ON ( wp_posts.ID = mt5.post_id ) LEFT JOIN wp_postmeta AS mt6 ON (wp_posts.ID = mt6.post_id AND mt6.meta_key = ‘discount_end_date’ ) WHERE 1=1 AND (
wp_postmeta.meta_key = ‘discount_priority’
AND
(
( mt1.meta_key = ‘discount_status’ AND CAST(mt1.meta_value AS SIGNED) = ‘1’ )
AND
( mt2.meta_key = ‘discount_start_date’ AND CAST(mt2.meta_value AS DATETIME) <= ‘2021-02-20 05:25:16’ )
AND
(
( mt3.meta_key = ‘discount_type’ AND mt3.meta_value = ‘cart_quantity’ )
OR
( mt4.meta_key = ‘discount_value’ AND mt4.meta_value != ” )
)
AND
(
( mt5.meta_key = ‘discount_end_date’ AND CAST(mt5.meta_value AS DATETIME) >= ‘2021-02-20 05:25:16’ )
OR
mt6.post_id IS NULL
OR
( mt5.meta_key = ‘discount_end_date’ AND mt5.meta_value = ” )
)
)
) AND wp_posts.post_type = ‘awdp_pt_rules’ AND ((wp_posts.post_status = ‘publish’)) GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value+0 ASC ”
[1]=>
float(4.3238670825958)
[2]=>
string(616) “require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘wp_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Cart_Session->get_cart_from_session, WC_Product_Variation->is_purchasable, WC_Product_Variation->variation_is_visible, WC_Product->get_price, WC_Data->get_prop, apply_filters(‘woocommerce_product_variation_get_price’), WP_Hook->apply_filters, AWDP_Front_End->get_product_price, AWDP_Discount->get_product_price, AWDP_Discount->calculate_discount, AWDP_Discount->load_rules, get_posts, WP_Query->query, WP_Query->get_posts”
[3]=>
float(1613798716.4157)
[4]=>
array(0) {
}
}The page I need help with: [log in to see the link]
The topic ‘website is too slow when this plugin active’ is closed to new replies.