• Resolved vastdesign

    (@vastdesign)


    Hi, we are experiencing really slow queries in regards to this plugin. Our developer suggested this code:

    function count_reviews() /*removed cek0 if ( ‘product_review’ === $comment_type ) { // filter by product reviews $where = “WHERE n.comment_type NOT IN ( ‘cr_qna’ ) AND m.post_type = ‘product'”; } elseif ( ‘store_review’ === $comment_type ) { // filter by store reviews $where = “WHERE ( n.comment_type NOT IN ( ‘cr_qna’ ) AND n.comment_post_ID IN ( ” . $in_shop_page . ” ) )”; } else { // all reviews $where = “WHERE ( n.comment_type NOT IN ( ‘cr_qna’ ) AND (m.post_type = ‘product’ OR n.comment_post_ID IN ( ” . $in_shop_page . ” ) ) )”; }*/ /*added cek0*/ if ( ‘product_review’ === $comment_type && !is_array($in_shop_page) && $is_shop_page == 0) { // filter by product reviews $where = “WHERE n.comment_type <> ‘cr_qna’ AND m.post_type = ‘product'”; } elseif ( ‘store_review’ === $comment_type && is_array($in_shop_page)) { // filter by store reviews $where = “WHERE ( n.comment_type <> ‘cr_qna’ AND n.comment_post_ID IN ( ” . $in_shop_page . ” ) )”; } else { // all reviews if(is_array($in_shop_page)){ $where = “WHERE ( n.comment_type <> ‘cr_qna’ AND (m.post_type = ‘product’ OR n.comment_post_ID IN ( ” . $in_shop_page . ” ) ) )”; } else{ $where = “WHERE ( n.comment_type <> ‘cr_qna’ AND m.post_type = ‘product’)”; } }/*end cek0*/

    Any ideas on if this is good to do? Suggestions?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support pear8398

    (@pear8398)

    Hi,

    Thanks for using CusRev.

    May I ask you some questions, where do you see the slow queries? Frontend or backend? What happens if you only activate CusRev, WooCommerce and a standard theme of WordPress?

    Thread Starter vastdesign

    (@vastdesign)

    Hi, the slow query is only in the backend from what I can tell.

    Thread Starter vastdesign

    (@vastdesign)

    Database is very large. Any suggestions?

    Plugin Support pear8398

    (@pear8398)

    Hi,

    Did you try activating only CusRev and WooCommerce as I suggested above? You can copy your site to a staging site and check the issue there.

    Plugin Support bagel1317

    (@bagel1317)

    We haven’t heard from you for more than two weeks. For this reason, I’ll assume that either you are not interested in this question/problem anymore or it has been resolved. If you still require any help, please start a new forum topic

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘SLOW QUERIES’ is closed to new replies.