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
-
Three things to do this World Backup Day
This World Backup Day, take the time to ensure your website is protected. From automating backups to connecting to remote storage, these three steps will keep your data safe. Plus, enjoy a 10% discount on UpdraftPlus Premium for a limited time!
-
Same team, different name. Welcome to TeamUpdraft (for affiliates)
Attention affiliates! TeamUpdraft is here, combining UpdraftPlus, WP-Optimize, and AIOS. Explore new ways to earn with our unified brand.
-
Same team, different name. Welcome to TeamUpdraft
UpdraftPlus, WP-Optimize & AIOS are now under TeamUpdraft! Find out what’s changed, how to log in, and where to get support.
-
WP-Optimize release v4.0.0
WP-Optimize v4.0.0 is here! This update introduces JavaScript execution delay, minimum requirements changes, and performance improvements.