Improve your WooCommerce site performance with this power tweak
What is the WooCommerce ‘power tweak’ feature?
Section titled What is the WooCommerce ‘power tweak’ feature?WooCommerce is a popular e-commerce platform for WordPress. It offers great functionality but also has its challenges. Our team found a problem with WooCommerce’s performance, and we created a ‘Power tweak’ feature that fixes it. This feature is one of two power tweaks available in our plugin. It makes your website more efficient by optimizing a WooCommerce database query.
What is the issue with WooCommerce?
Section titled What is the issue with WooCommerce?We’ve found that WooCommerce has a critical performance issue related to one of its database queries. The query lies within a function called get_total_spent
, used to calculate the total amount of money spent by a customer. The query makes a calculation using several double left-joins on the post and post meta tables for lookups. This process is inefficient, as MySQL must scan a large number of rows with each new order. On a typical site, this could involve scanning over 80% of the rows in the post meta table. In one case study, MySQL had to scan over 13,000,000 rows, significantly impacting performance and user experience.
Our solution
Section titled Our solutionAs developers, we’ve learned that finding our own solution is often the best way to get things done. So, we engineered this feature to confront the WooCommerce query dilemma head-on. We suggested that WooCommerce use two simpler SQL queries instead of that one complicated query. However, in the absence of changes from WooCommerce, we’ve taken the initiative.
WP-Optimize has a feature called ‘Power tweak’. It replaces the problematic double left-join query in WooCommerce with two shorter, more efficient queries. This enhancement is crucial for sites with high volumes of orders.
To learn more and stay updated, check out our Github thread where our lead developer and founder, David Anderson, discusses this issue.
How to access the power tweak feature
Section titled How to access the power tweak featureTo use this feature, you’ll need the premium version of WP-Optimize.
About the author

TeamUpdraft
Our team consists of WordPress developers, marketers, and industry experts committed to providing you with the resources and skills you need to succeed online. Whether you’re just starting out or seeking advanced strategies, we’re here to enhance your WordPress journey and support you at every stage.
Categories
WP-Optimize
Get all our premium features. Lazy loading, pre-load key requests, Cloudfare integration. Optimize individual tables, delete unused images and more.
From just $49 for the year.
More stories
-
IDrive now supported in UpdraftPlus as S3 storage
UpdraftPlus now supports IDrive as an S3-compatible backup storage option. Discover what this means and why IDrive is a great storage option.
-
WP-Optimize release v4.2.3: Power up your site’s performance with key fixes and tweaks
Learn what’s new in WP-Optimize 4.2.3, including caching and image fixes.
-
TeamUpdraft joins the Codeable Partners Network
We’ve joined the Codeable Partners Network- learn what this means for our users.
-
MEGA now supported in UpdraftPlus as S3 storage
UpdraftPlus now supports MEGA as an S3-compatible backup storage option. Discover what this means and why MEGA is a great new choice.