WP eCommerce
Slow query when dealing with wp_wpsc_submited_form_data (2 posts)

  1. nsoonhui
    Posted 2 years ago #

    Store URL: kindlemalaysia.com
    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_checkout_forms.id = 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?


  2. whitelamp
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.