Fast Woo Order Lookup

Description

Les pages de Commandes et d’Abonnements de WooCommerce permettent aux propriétaires de boutiques de rechercher des commandes et des abonnements par nom de client, e-mail et autres attributs. Par défaut, elle effectue une recherche de sous-chaîne générale. Par exemple, si vous mettez OllieJones dans la boîte de recherche, cela recherchera avec LIKE '%OllieJones%' en utilisant le joker initial %. Cela est étonnamment lent sur les sites avec de nombreuses commandes.

Upon activation this plugin uses ActionScheduler to run a background process to create a special-purpose index table, a table of trigrams, to speed up that search. Then it uses those trigrams to search for orders.

L’inconvénient : la table de trigrammes prend de l’espace dans la base de données et prend du temps à générer.

The orders page itself contains a slow query to look up meta_keys. This fixes that query’s performance too, using a cache of available values.

If you have problems

The WordPress and WooCommerce ecosystems offer many optional features enabled by plugins. And, WooCommerce sites run on many different versions of database server. It is not possible to test this plugin on every imaginable combination. So, you may have problems getting it to work.

Sometimes the process of creating the index table does not complete correctly. And, sometimes you cannot find some orders after the index is created.

If you tell the author about these problems, he will attempt to fix them. Please create a support topic, then visit Site Health, view the Info tab, click the Copy Site Info to Clipboard button, and paste that information into the support topic. And, of course, please describe what is going wrong.

Crédits

Merci à Leho Kraav d’avoir attiré mon attention sur ce problème.

Merci à Sebastian Sommer et Maxime Michaud d’avoir utilisé les premières versions de l’extension sur de grandes boutiques, et à Maxime Michaud pour avoir réalisé la traduction en français.

Merci à JetBrains pour l’utilisation de leurs outils de développement logiciel, notamment PhpStorm. Il est difficile d’imaginer comment une extension comme celle-ci pourrait être développée sans les outils de PhpStorm pour explorer des bases de code épiques comme celle de WordPress.

Comment puis-je en apprendre davantage pour rendre mon site WordPress plus efficace ?

Nous proposons plusieurs extensions pour améliorer l’efficacité de la base de données de votre site. Vous pouvez en lire plus ici.

Installation

Suivez la procédure habituelle pour installer une extension depuis le dépôt d’extensions de wordpress.org.

When you activate the plugin, it creates the trigram index. As it does so it processes orders in batches of 100 and inserts trigrams in batches of 200. Larger batch sizes make the indexing process more efficient, but they do consume server RAM while running.

You can, if need be, change these batch sizes in your wp-config.php file. If you do this, do so before you activate the plugin. Here are examples.

define( 'FAST_WOO_ORDER_LOOKUP_ORDER_BATCH_SIZE', 200 ); changes the order batch size to 200.

define( 'FAST_WOO_ORDER_LOOKUP_TRIGRAM_BATCH_SIZE', 500 ); changes the trigram batch size to 500

FAQ

Quelle est la raison d’être de cette extension ?

Voyez cet incident WooCommerce pour un exemple du problème de performance que rencontrent les propriétaires de boutiques. Consultez cet incident Abonnements pour un autre exemple.

Quelle est la solution ?

Construisez une table de recherche de trigrammes, maintenez-la et utilisez-la pour les requêtes.

How much space does the lookup table — `wp_fwol` — take?

It takes about 5-10KiB per order, as MariaDB / MySQL database storage, counting both data and indexes. So, if your site has a million orders, the table will take something like 5-10 GiB. The rows of the table are each quite small, just three letters and an order ID. And there are many of those rows for each order.

The table, named with an abbreviation for « Fast Woo Order Lookup », contains the trigram lookups. It has a terse name to keep queries short. It is dropped automatically if you deactivate the plugin.

Can it get so large this plugin becomes useless or counterproductive?

No, unless your database tablespace is too small for it.

This answer uses the Big O conceptual way of understanding program performance.

The table is organized by its primary key so this plugin can search for orders with O(log n) computational complexity. That means if searching 100 orders takes two seconds, then searching 1000 takes about three seconds and 10,000 about four. So it will work at large scale. And without this plugin the complexity of the order search in WooCommerce is a quite unpleasant O(n). Ten times as many orders take ten times as long to search. So, 100 times as many take 100 times as long. Used at large scale that gets nasty. It burns server electricity. Just as importantly, it wastes users’ time.

That’s true even if you use a nice search plugin like Relevanssi to help your customers search for products. The author does that. It works. But not on orders.

This plugin improves order search performance by using a better algorithm. It’s the InnoDB team we have to thank for this in MariaDB and MySQL. Legendary. (See, Dr. Knuth? Somebody read your book!)

If your hosting service is such a cheapskate you don’t have the tablespace for the table, that might be a reason to avoid this plugin.

Combien de temps faut-il pour générer la table de recherche de trigrammes ?

Lorsque vous activez l’extension, celle-ci commence à générer la table en arrière-plan. Tout continue normalement pendant que l’extension génère la table.

La génération de la table semble prendre environ dix secondes (en arrière-plan) pour chaque millier de commandes.

Fonctionne-t-il avec le High-Performance Order Storage (HPOS) ?

Yes. It also works with the performance enhancements in WooCommerce 9.9.0 and beyond. Alas, it is still required to get good performance with order search.

Fonctionne-t-il avec le stockage de commandes pré-HPOS ?

Oui.

La table de recherche semble être obsolète. Je ne trouve pas les commandes récentes. Que dois-je faire ?

  1. Informez l’auteur en créant un issue à l’adresse https://github.com/OllieJones/fast-woo-order-lookup/issues
  2.  Désactivez, puis activez l’extension. Cela reconstruit la table de recherche.

Ma boutique n’a que quelques centaines de commandes. Ai-je besoin de cette extension ?

This plugin addresses database performance problems that only show themselves on stores with many thousands of orders. If your store is smaller than that you probably don’t need it.

Les propriétaires avisés de boutiques en pleine croissance reviennent régulièrement pour examiner les performances de leur site. Si votre site est encore petit, il est préférable d’attendre d’avoir réellement besoin d’extensions et de fonctionnalités d’optimisation des performances. Les installer « juste au cas où » est inefficace.

Avis

18 novembre 2025
Absolutely fantastic numbers on the order searches in large environments with this plugin. Ollie is amazing at finding workarounds to make this plugin work. This is what WooCommerce order search should have been from the beginning. Thanks alot Ollie!
11 octobre 2024
this is, by far, the « must have » plugin for big shops, pair this with HPOS and you search in 300k+ orders in less than 1 second! (with 100 order listing!).very great work, this should be merged in core!
2 octobre 2024
We have been using this plugin since its initial release, their updates are brilliant never a hitch and being a fast based ecommerce company we need all the speed we can get. With over 120,000 orders in active view this plugin makes looking up orders super quick for our support team.
14 septembre 2024 1 réponse
We’ve been using Index WP MySQL For Speed for some time, and the creator also recommended the Fast Woo Order Lookup plugin. This plugin seems to function correctly, and the method used to accelerate searches is ingenious. The order search feature was a frequent offender in our MySQL slow query log, but it seems to be much less of an issue now. According to both customer service testimonials and personal experience, searches are significantly faster. Previously, a search could take up to ten seconds now, it often takes about three seconds. There are times when it may take slightly longer, but generally, it’s much quicker. One downside of this plugin—which I personally don’t consider a negative—is that the trigram table uses about 6.4GB of space. It’s also worth mentioning that we have over 630,000 orders on the site in question. We therefore recommend this plugin if you’re looking to reduce search times for anyone needing to look up orders on your site. It will enhance their productivity and also reduce processing time to deliver the desired results. We haven’t encountered any problems with this plugin, but I should mention that it should be implemented by someone with some technical knowledge to measure the impact it will have. This can depend on whether your site has plugins that modify certain aspects. Also, if your site is inherently slow, this plugin won’t perform miracles to solve underlying issues.
19 juillet 2024 1 réponse
I have been using Oliver’s plugins for years and they are amazing. This one is no exception. It improved the time to search for orders on a site with over 130,000 orders from 120 seconds to just 3 seconds! Just one question: does this plugin keep generating the indexes over and over again? Because I get this message constantly on the site: “Fast Woo Order Lookup indexing still in progress. 100% complete. See the Scheduled Actions status page for details.” And when this happens, the site backend and order lookup slows down again.
Lire les 6 avis

Contributeurs/contributrices & développeurs/développeuses

« Fast Woo Order Lookup » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

“Fast Woo Order Lookup” a été traduit dans 3 locales. Remerciez l’équipe de traduction pour ses contributions.

Traduisez « Fast Woo Order Lookup » dans votre langue.

Le développement vous intéresse ?

Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.

Journal des modifications

= 1.2.2 November 12, 2025

Work with legacy WooCommerce installations without data in wp_wc_orders or wp_wc_ordermeta. Props to Christoffer Gisselfeldt.

1.2.1

November 11, 2025

  • Support legacy WooCommerce back to 8.1.

  • Track RAM usage.

  • Mitigate deadlocks

1.2.0

October 17, 2025

Correct an intermittent problem maintaining the postmeta key cache. Props tp slservice33 on w.org.

1.1.11

September 24, 2025 =

WooCommerce 10.2.1, indexing defect fixed, gap skipping when indexing. Props to StefT1 on GitHub.