Support » Plugin: WP eCommerce » Slow query when dealing with wp_wpsc_submited_form_data

  • Store URL:
    WordPress version: 3.6.1
    WP e-Commerce version:
    Gold Cart version: —
    Theme: —

    I found that my wp-ecommerce is slow at the following query:

    SELECT wp_wpsc_submited_form_data.value, wp_wpsc_checkout_forms.* FROM wp_wpsc_checkout_forms LEFT JOIN wp_wpsc_submited_form_data ON = wp_wpsc_submited_form_data.form_id WHERE wp_wpsc_submited_form_data.log_id = 656 OR wp_wpsc_checkout_forms.type = 'heading' ORDER BY wp_wpsc_checkout_forms.checkout_set, wp_wpsc_checkout_forms.checkout_order /* From [/products-page/your-account/] in [/nas/wp/www/staging/*/wp-content/plugins/wp-e-commerce/wpsc-theme/functions/wpsc-user_log_functions.php:659] */;

    With the performance:

    Query_time: 7.282546 Lock_time: 0.000076 Rows_sent: 18 Rows_examined: 713142

    About 713K row examined, and it took 7.2 seconds. This is really slow.

    When I checked the wp_wpsc_submited_form_data, there were about 40K items in it. But overall, I still think the above query is not really efficient; is it that the future versions of wp ecommerce can improve on this query?

Viewing 1 replies (of 1 total)
  • Try adding an index to form_id on wp_wpsc_submited_form_data. I did this with phpmyadmin and found that the query ran about ten times faster.

    Also, make sure you have a decent sized query cache running on your server.

Viewing 1 replies (of 1 total)
  • The topic ‘Slow query when dealing with wp_wpsc_submited_form_data’ is closed to new replies.