Test cases
We wanted to see how well the new HPOS feature in WooCommerce 8.2, which is from now on the default way to store order data, performs. This change mostly impacts the WP Admin dashboard for big stores with hundreds of thousands or millions of orders. To test this, we created 500,000 orders and customers in our test store, along with 1.3 million products. Here’s the list of the test scenarios we used:
- Checkout with one single product
- Page load speed admin orders list
- The page load speed of admin orders list search / full-text query
- Page load speed order edit page
- Duration order update process
Results
We tested 4 different system configurations:
- Wocommerce orders with old DB structure and enabled ElasticPress
- Wocommerce orders with old DB structure and disabled ElasticPress
- Wocommerce orders with HPOS structure and enabled ElasticPress
- Wocommerce orders with HPOS structure and disabled ElasticPress
To measure Query time we used the “Query Monitor” plugin. Load time is the time to load the page in the browser (no scripts/styles only document).
Testcase | WP DB Load Time; EP enabled | WP DB Query Time; EP enabled | WP DB Load Time; EP disabled | WP DB Query Time; EP disabled | HPOS Load Time; EP enabled | HPOS Query Time; EP enabled | HPOS Load Time; EP disabled | HPOS Query Time; EP disabled |
Checkout with one single product | 12.0-12.1s | 11.26s | 10.4s | 7.8s | 11.3s | 10.3s | 9.6s | 8.9s |
Admin Orders List | 2.2s | 0.2s | 10.8s | 7.8s | 2.1s | 0.66s | 3.2s | 0.35s |
Admin Orders List Search (text, no cache) | 3.5s | 1,1-1,5s | Gateway Time-out (600s) | Gateway Time-out (600s) | 72s | 68s | 66s | 61s |
Order Edit Page | 1s | 0.15s | 7.7s | 5.4s | 1.5-1.6s | 0.6s | 1s | 0.25s |
Update Order | 11.2s | 10.2s | 15.2s | 13.66s | 12.68s | 11.6s | 11.3s | 9.7s |
We can see that ElasticPress + Elastic search is the perfect solution if you need a search or filters on the shop frontend.
Without ElasticPress, we weren’t able to filter 1,300,000+ products and 500,000 orders at all, it took minutes or returned timeout. ElasticPress solved this problem. As usual, any tool has pros and cons, we can see that it is great for complex SELECT operations, but if we need CREATE or UPDATE it works a bit slowly because we need to sync data with the ElasticSearch index.
Also, we see that when ElasticSearch integration is disabled, the HPOS feature works faster than the previous DB structure in the WP Admin dashboard, especially SELECT operations like the list of orders or single order page.