Support » Plugin: WooCommerce » Very slow query

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support RK

    (@riaanknoetze)

    Hi there,

    Where exactly are you seeing that query being run? Based on the exact query, it looks like this might be an orders page where a plugin has added custom order statii? Are you seeing the same thing with that custom order status plugin disabled?

    cristianciuberea

    (@cristianciuberea)

    Hello,

    I see this in orders page.

    The custom statuses are created by functions.php file

    Below is the code. Do you think that is from that statuses?

    /**
    * Register new status refuz & verificare
    **/
    function register_new_orders_status() {
    register_post_status( ‘wc-refuz’, array(
    ‘label’ => ‘Refuz comanda’,
    ‘public’ => true,
    ‘exclude_from_search’ => false,
    ‘show_in_admin_all_list’ => true,
    ‘show_in_admin_status_list’ => true,
    ‘label_count’ => _n_noop( ‘Refuzată <span class=”count”>(%s)</span>’, ‘Refuzate <span class=”count”>(%s)</span>’ )
    ) );
    register_post_status( ‘wc-verificare’, array(
    ‘label’ => ‘Necesita verificare’,
    ‘public’ => true,
    ‘exclude_from_search’ => false,
    ‘show_in_admin_all_list’ => true,
    ‘show_in_admin_status_list’ => true,
    ‘label_count’ => _n_noop( ‘Necesita verificare <span class=”count”>(%s)</span>’, ‘Necesita verificare <span class=”count”>(%s)</span>’ )
    ) );
    }
    add_action( ‘init’, ‘register_new_orders_status’ );
    // Add to list of WC Order statuses
    function add_new_orders_to_order_statuses( $order_statuses ) {
    $new_order_statuses = array();
    // add new order status after processing
    foreach ( $order_statuses as $key => $status ) {
    $new_order_statuses[ $key ] = $status;
    if ( ‘wc-processing’ === $key ) {
    $new_order_statuses[‘wc-refuz’] = ‘Refuzata’;
    $new_order_statuses[‘wc-verificare’] = ‘Necesita verificare’;
    }
    }
    return $new_order_statuses;
    }
    add_filter( ‘wc_order_statuses’, ‘add_new_orders_to_order_statuses’ );

    Plugin Support Jesse Pearson

    (@jessepearson)

    Automattic Happiness Engineer

    @cristianciuberea The custom statuses should not be an issue here. Do you have a lot of orders? Is this still an issue for you?

    We have about 3000+ per month, 80000+ in total.

    yes, the problem is still here http://prntscr.com/oq0wx5

    50 orders load in about 5 seconds in the orders admin area http://prntscr.com/oq0y00

    Plugin Support Jesse Pearson

    (@jessepearson)

    Automattic Happiness Engineer

    @cristianciuberea From here I’d recommend copying the site to a staging site, perhaps with the use of WP Staging: https://wordpress.org/plugins/wp-staging/

    After that’s done, test on that site with just WooCommerce active and see if it’s still an issue. If not, then it’s other plugins slowing the site down.

    The issue could also be database related. Some hosts have their db servers shared and their resources aren’t the same as the servers where your files are hosted.

    Ok Jesse,
    Will check.

    Thank you

    Plugin Support Mike W

    (@nixiack8)

    Hi @cristianciuberea,

    Was the test successful? Please let us know 🙂

    Plugin Support Jesse Pearson

    (@jessepearson)

    Automattic Happiness Engineer

    @cristianciuberea We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.