What Is High-Performance Order Storage In WooCommerce?
A look at what we know so far about the implementation of High-Performance Order Storage in WooCommerce, and what impact it will have on existing WooCommerce stores.
Oops! We could not locate your form.
A look at what we know so far about the implementation of High-Performance Order Storage in WooCommerce, and what impact it will have on existing WooCommerce stores.
Edit: This post has been regularly updated to keep inline with the progress at WooCommerce.
In January 2022, WooCommerce shared its plans to implement custom tables for entities like orders and products.
It had been a request the company had received from the developer community for some time, but they had been hesitant to implement it due to the scale of changes required and their potential impact on existing WooCommerce sites and plugins.
However, the post confirmed that they were finally pushing ahead with making it happen, starting with custom order tables.
With the introduction of High-Performance Order Storage (HPOS), WooCommerce aims to improve the scalability, reliability and simplicity of the platform, providing a database structure better suited to the needs of e-commerce businesses.
It will change the way in which order data is stored and retrieved, bringing with it performance improvements.
Rather than data and metadata for core WooCommerce order properties being stored in the post and post meta tables as it currently is, they will be stored in these custom tables. These tables include:
They have confirmed that they will be ensuring compatibility with WooCommerce-owned extensions and plugins like WooCommerce Stripe Payment Gateway and WooCommerce Subscriptions.
The hope is that the developers of any 3rd party plugins that currently store order data to post tables will follow suit.
The team and contributors have been working away behind the scenes, and in September 2022 the WooCommerce developer blog published an update on the HPOS project process and present timeline.
HPOS became available to test and use as an opt-in feature in WooCommerce 7.1, which was released in November 2022.
In August 2023 will become the default in WooCommerce. Any extensions and plugins that aren’t compatible by that time will not be able to be activated on new WooCommerce sites.
In anticipation of this change being introduced as an option in version 7.1 this November, WooCommerce has begun sharing a series of articles to provide more in-depth information on the solution to help prepare users.
At the point of writing they have released 3 of these posts.
The first of these was on the updated database schema. It hasn’t changed a great deal from what they originally proposed when they first announced the project. The post provides a good overview of the tables, their structure, and the fields they will store, and explains any changes from the originally proposed schema.
The second post covers backwards compatibility and synchronisation. This is obviously an area that is of great concern to developers.
The third post covers performance. To demonstrate the performance opportunities that HPOS brings, the team at WooCommerce have tested it on an existing site that has a product catalogue of about 30,000 items, and a database of about 400,000 previous orders.
The results look very promising, with improvements across all tests from the old Post Table method to the new HPOS method. They also have further tests planned.
To minimise the impact on existing websites, the team at WooCommerce have put in place measures to mitigate any problems that could occur on update and has provided a roadmap for moving to HPOS as default.
These are briefly summarised here:
The change to HPOS is opt-in for now, to give people time to test and implement it. It will likely become the default with WooCommerce 8.0 in August 2023.
If you opt-in to HPOS, your order data will be duplicated and synced across the post and post meta tables where it’s currently stored, and the new HPOS tables.
This means that initially there will be no performance gains.
However, once you’ve tested that HPOS works properly with your site and plugins, and you can verify that nothing is relying on the old data, you’ll be able to disable the data synchronisation. Then you should be able to see the improvements that this method of storage brings to your website’s performance.
They have provided information on verification and ensuring data consistency to help with this process.
The order id in the new HPOS tables will equal the post id in the current post tables, enabling you to switch between the 2 order storage table options once they are synced. For now at least.
It should also minimise any issues regarding historical order data, as the IDs will match.
There should be no immediate issues for plugins that interact with your order data.
Those that interact via the WC_Order class should have a completely smooth transition.
However, those that directly interact with post and postmeta will be reliant on the data synchronisation between old and new tables to work.
These plugins will need to be updated by their developers before WooCommerce 8 is released, as this is when the data duplication and synchronisation will likely cease, and HPOS will become the default for order data storage.
Those that don’t become compatible, won’t be able to be activated on new WooCommerce stores once HPOS becomes the default.
The posts also cover how to migrate data and populate HPOS tables, pointing to the guidance they provided to testers back in May 2022. It can be done via the command line interface or by using Action Scheduler. They recommend the former for larger e-commerce sites.
In the coming weeks, WooCommerce will be sharing further posts covering the following HPOS topics:
These will hopefully answer any questions that developers have regarding the implementation of HPOS into their own e-commerce sites, and allow for a relatively smooth transition.
I will update this post as more information becomes available.
This seems to heavily rest on how your website is built and the plugins and extensions it uses that have any interaction with order data.
Presumably, this includes:
The next few posts from the WooCommerce team will hopefully make this clearer so that e-commerce businesses can better understand any time and resources they need to assign to ensure the migration goes smoothly.
So far, the primary task required will be the migration of data and the population of HPOS tables. Everything else will likely depend on the developers of plugins and extensions, and how soon they make their products compatible.
The introduction of high-performance order storage should have a positive impact on the performance of WooCommerce websites. It should also help cement WooCommerce in its position as a popular, flexible and scalable e-commerce platform for stores of all sizes.
What’s more, once HPOS is fully implemented, it will hopefully pave the way for further custom tables for other entities, such as custom product tables. This could drastically improve the native product filtering in WooCommerce for products that have multiple variations.
In the meantime, however, I’ll keep this post updated as when new information becomes available. If you require any help with the transition to HPOS or have any questions, our team are on hand. Just drop us a message here.