WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. nsoonhui
    Member
    Posted 11 months ago #

    Store URL: kindlemalaysia.com
    WordPress version: 3.6.1
    WP e-Commerce version: 3.8.12.1
    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?

    http://wordpress.org/plugins/wp-e-commerce/

  2. whitelamp
    Member
    Posted 11 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.