High-Performance Order Storage on WooCommerce

High-Performance Order Storage on WooCommerce - Hero Image

In late 2022, WooCommerce introduced plans to optimize the performance of WooCommerce Core by focusing on Orders and ways to efficiently manage Order data. Originally dubbed the Custom Order Tables project, it has since been renamed to High-Performance Order Storage, or HPOS.

With the release of WooCommerce 7.1, an option was introduced that allowed users to opt-in / enable High-Performance Order Storage on their online stores. In March 2023, WooCommerce developers announced that HPOS will be enabled by default on all storefronts by August 2023.

This article will cover what HPOS is, its features, and what changes it may be bringing for eCommerce store owners.

High-Performance Order Storage on WooCommerce

Out of all the websites that use WordPress as a Content Management System (CMS), 8.7% use WooCommerce as an eCommerce platform, making it more popular than SquareSpace and Shopify.

With WordPress’s focus on Performance increasing in the past couple of years, developers showed interest in improving the performance of WooCommerce database tables in order to streamline the order process.

In January 2022, the “Plan for the WooCommerce Custom Order Table” article introduced the project that would eventually become High-Performance Order Storage. 

Understanding HPOS

Until recently, WooCommerce stored their order data within the WordPress database under the wp_posts and wp_postmeta tables. This gave users access to tools provided by WordPress to manage orders.

WooCommerce designed High-Performance Order Storage to meet the needs of eCommerce stores using WooCommerce CRUD to store data in custom tables optimized for WooCommerce queries.

How to opt-in for HPOS in WooCommerce.
Image Source: WooCommerce

By using this database structure, developers aim to improve scalability, simplify data storage, and enhance reliability for online shops, improving overall website performance.

Since its introduction, WooCommerce reports that a website’s checkout process is 1.5x faster after enabling HPOS. 

The Three Goals of HPOS

Per WooCommerce’s initial introduction of Custom Order Tables, their three main goals for this project were the following: 

Scalability

In order to meet the need of stores with increasing clientele, tables get separated into specific data subsections, such as order addresses and order titles. This separation less read/write operations take place, ensuring faster times for business regardless of their size.

Reliability

Because of their separated database tables, it’s easier to restore data, as users now can restore the specific lost information. Backups of websites are therefore more reliable and read/write locks are easier to implement. 

Simplicity

WooCommerce empowers users to develop better plugins and extensions with the separation of the wp_posts table. As storage differentiation will result in smaller tables, users can now read and understand their database better.

To get more information on the focus of HPOS, we recommend reading WooCommerce’s Documentation.

HPOS Implementation

The four database table structures HPOS introduces are:

  1. Main Order Table – adds columns for frequently used meta values. Some column values include order id, status, billing email, etc.
  2. Order Addresses Table – Stores the shipping and billing information from customers.
  3. Order Operational Table – Maintains certain order values that are not part of the Main Order Table as they could change in the future.
  4. Order Meta Table – acts as a data store for WooCommerce extension’s data, similar to wp_postmeta.
The four database structures proposed by WooCommerce developers.
Proposed Database Table Structure by WooCommerce in January 2022

Previously all information was stored in the wp_posts and wp_postmeta with multiple joints and lookups needed for each new order.

The structure of the tables above allow for easier lookup and process of orders and client information, decreasing the time needed between each request.

Testing Website Performance

On March 17, ten days after the announcement of HPOS as a default, WooCommerce released the results from a series of performance benchmarking tests on a website utilizing this technology.

The website used for the performance testing contained 400k orders and 30k products. Both HPOS and WP query cache were disabled for the initial performance benchmarks.

Note: The only performance altering modification enabled on the website used for the experiment was Memcached due to the web host offering it.

In order to further test performance, developers performed these tasks with only one worker, meaning each request would be done only one at the time, rather than consecutively as most websites do today. The results of this test therefore would display higher performance if multiple workers were used.

Improve the performance and security of your WooCommerce site with our new WooCommerce Hosting plans. Get 40x faster speeds for your online store with dedicated resources, server caching, and optimization tools.

check markHigh-Performance VPS check mark99.99% Uptime check markFree SSL & Dedicated IP check markAdvanced Server Caching

WooCommerce Hosting

Performance Benchmark Test Results

For the purposes of this article, we will round up to the second decimal place. To review the  full breakdown of the test, code used for benchmarking and full results, we recommend reading WooCommerce’s documentation.

  • Order Creation – The time to create 1000 orders was 15.18 seconds when using HPOS, 5x faster than with the Posts Table. 
  • Order Checkout – The time to process 10 checkouts with HPOS was 0.99 seconds, a 1.5x increase in performance. 
  • Search Orders Using Metadata – It took 0.05 seconds to search 1000 orders by metadata via HPOS, a 10x improvement from Post Tables.
    • Note: With the access to add indexes to the Order Meta table, data lookup compared to the Posts Table is faster; however as indexes do slow down internet speed. However, because of the results of the other tests, this small increase in performance is still a positive result. 
  • Filtering by an Indexed Column – With their improved metadata structure, HPOS can use the index of customer_id to filter 1000 orders for customers at only 0.15 seconds,  40x faster than with Posts Table. 
  • Search Orders Using Non-Indexed Column – Although developers still expect some improvement on this section, HPOS filtered orders in 0.29 seconds, 3x faster than Posts Table. 

WooCommerce and Database Size

Because of their current work and since the separation of the wp_postmeta would decrease the tables MySQL needs to query, it is possible to decrease the database size and therefore get faster speed times. 

While this work is still in progress, WooCommerce speculates that woocommerce.com would see the post meta table data reduction of 97% with HPOS.

The New Normal

High-Performance Order Storage is an exciting and promising new feature coming to all WooCommerce websites; however, for business owners who have not opted-in on HPOS, the switch to default with WooCommerce 8.0 may raise some concerns. 

In order to be prepared for the HPOS in August, we recommend reviewing the following items prior to updating your WooCommerce plugin: 

  1. Create a backup of your WooCommerce website 
  2. Ensure the current extensions or theme you have are compatible with HPOS
    • If these extensions use Woo CRUD they are compatible, if extensions are not compatible they will be deactivated on your store 
  3. Stay up to date with the WooCommerce documentation for the latest updates

We strongly recommend updating your WooCommerce plugin, as not updating it in order to keep an older version can threaten your website’s security and future support from WooCommerce. 

Final Thoughts

The upcoming changes to WooCommerce through the use of High-Performance Order Storage will open new doors to users that value performance and speed. Faster order processing, checkout flow, and security will help improve user experience and likely sales for business owners. 

The scalability, reliability, and simplicity of WooCommerce is why it continues to be one of the largest eCommerce platforms currently available.

If you’re searching for a hosting plan that offers performance out of the box, choose InMotion Hosting’s WooCommerce Hosting Plans for your online store. Our UltraStack cloud infrastructure provides superior reliability, dedicated resources and server-level caching to boost your online store’s speed. Leverage W3 Total Cache to enable caching for Redis object storage, database caching, browser caching, lazy loading, and more.

Additional WooCommerce Resources

Shay Bravo
Shay Bravo Digital Content Producer

Shay is a Digital Content Producer for InMotion Hosting with a passion for WordPress and Web Design. Her focus is making content for users to understand WordPress and Tech better, no matter their skill level.

More Articles by Shay

Was this article helpful? Join the conversation!

Server Madness Sale
Score Big with Savings up to 99% Off

X