Title: Fast Woo Order Lookup
Author: OllieJones
Published: <strong>Maig 27, 2024</strong>
Last modified: Març 4, 2026

---

Search plugins

![](https://ps.w.org/fast-woo-order-lookup/assets/banner-772x250.jpg?rev=3093322)

![](https://ps.w.org/fast-woo-order-lookup/assets/icon-128x128.jpg?rev=3093322)

# Fast Woo Order Lookup

 By [OllieJones](https://profiles.wordpress.org/olliejones/)

[Download](https://downloads.wordpress.org/plugin/fast-woo-order-lookup.1.3.0.zip)

 * [Details](https://bal.wordpress.org/plugins/fast-woo-order-lookup/#description)
 * [Reviews](https://bal.wordpress.org/plugins/fast-woo-order-lookup/#reviews)
 *  [Installation](https://bal.wordpress.org/plugins/fast-woo-order-lookup/#installation)
 * [Development](https://bal.wordpress.org/plugins/fast-woo-order-lookup/#developers)

 [Support](https://wordpress.org/support/plugin/fast-woo-order-lookup/)

## Description

WooCommerce’s Order and Subscription pages allow store owners to search for orders
and subscriptions by customer name, email, and other attributes. By default, it 
does a general substring search. For example, if you put OllieJones into the search
box, it will search with `LIKE '%OllieJones%'` using the leading wildcard `%`. That’s
astonishingly slow on sites with many orders.

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.

The downside: the trigram table takes database space and takes time to generate.

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.

#### Credits

Thanks to Leho Kraav for bringing this problem to my attention.

Thanks to Sebastian Sommer and Maxime Michaud for using early versions of the plugin
on large stores, and to Maxime Michaud for creating the transation into French.

Thanks to Jetbrains for the use of their software development tools, especially 
[PhpStorm](https://www.jetbrains.com/phpstorm/). It’s hard to imagine how a plugin
like this one could be developed without PhpStorm’s tools for exploring epic code
bases like WordPress’s.

#### How can I learn more about making my WordPress site more efficient?

We offer several plugins to help with your site’s database efficiency. You can [read about them here](https://www.plumislandmedia.net/wordpress/performance/optimizing-wordpress-database-servers/).

## Installation

Follow the usual procedure for installing a plugin from the wordpress.org plugin
repository.

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

### What’s the background for this?

See this [WooCommerce issue](https://github.com/woocommerce/woocommerce/issues/32826)
for an example of the performance problem store owners have. See this [Subscriptions issue](https://github.com/Automattic/woocommerce-subscriptions-core/issues/183)
for another example.

### What’s the fix?

Build a [trigram lookup table](https://www.plumislandmedia.net/wordpress-plugins/fast-woo-order-lookup/#how-does-it-work-trigrams),
maintain it, and use it for the queries.

### 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**](https://en.wikipedia.org/wiki/Big_O_notation) 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](https://wordpress.org/plugins/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.

### How long does it take to generate trigram lookup table?

When you activate the plugin, it starts generating the table in the background. 
Everything continues as normal while the plugin is generating the table.

Generating the table seems to take about ten seconds (in the background) for every
thousand orders.

### Does it work with 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.

### Does it work with pre-HPOS order storage?

**Yes**.

### The lookup table seems to be out of date. I can’t find recent orders. What do I do?

 1. Let the author know by creating an issue at https://github.com/OllieJones/fast-
    woo-order-lookup/issues
 2. Deactivate, then activate the plugin. This rebuilds the lookup table.

### My store only has a few hundred orders. Do I need this plugin ?

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.

Wise owners of rapidly growing stores return regularly to examine their site performance.
If your site is still small, it’s better to wait until you actually need performance-
enhancing plugins and other features. Installing them “just in case” is ineffective.

## Reviews

![](https://secure.gravatar.com/avatar/a704980b9a0ae3226ca0a8ce27cc6f98e8db9044ff8f2afccf2e44601489b886?
s=60&d=retro&r=g)

### 󠀁[Super Fast](https://wordpress.org/support/topic/super-fast-45/)󠁿

 [strictlymedicinal](https://profiles.wordpress.org/strictlymedicinal/) Abril 8,
2026

I was having to wait 10+ seconds to look up an order. We have a large store with
250,000+ orders Now it takes 1-2 seconds. Amazing sauce!

![](https://secure.gravatar.com/avatar/a99012ad32eb75351b7bd6d83c003eb9fccf30ca83bc7e126bfc4f36b2836747?
s=60&d=retro&r=g)

### 󠀁[Huge improvement](https://wordpress.org/support/topic/huge-improvement-6/)󠁿

 [bayramuygur](https://profiles.wordpress.org/bayramuygur/) Febrer 2, 2026

Great plugin. It’s a huge improvement for stores with lots of orders. Worked perfectly
for me on the legacy order tables. Thanks to the developer!

![](https://secure.gravatar.com/avatar/5d5f748a40e8a3c394e78a74d9a9ac1f6955046c7c0b7ada4029b164e93ec3a7?
s=60&d=retro&r=g)

### 󠀁[What the search should have been](https://wordpress.org/support/topic/what-the-search-should-have-been/)󠁿

 [gisselfeldt](https://profiles.wordpress.org/gisselfeldt/) Novembre 18, 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!

![](https://secure.gravatar.com/avatar/4d064a9bb35c75e1f4566f09f32158ea2d4d0bdc09ae69401d3f87b2af70e2b2?
s=60&d=retro&r=g)

### 󠀁[Half the search time then before for WooCommerce orders](https://wordpress.org/support/topic/half-the-search-time-then-before-for-woocommerce-orders/)󠁿

 [heel1](https://profiles.wordpress.org/heel1/) Octubre 11, 2025

This plugin is great, just does what it says. Search time on my orders has been 
reduced to about 50% off before. Thank you for the good work done!

![](https://secure.gravatar.com/avatar/ee421d3fd85b44d745307f4aba5cdfac6c8b05237fbfe7d443b9827d164ba234?
s=60&d=retro&r=g)

### 󠀁[holy grail of shop managers](https://wordpress.org/support/topic/holy-grail-of-shop-managers/)󠁿

 [Eduard Doloc](https://profiles.wordpress.org/rwky/) Octubre 11, 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!

![](https://secure.gravatar.com/avatar/f731bd1ab0eb2acd6aee8eea248e8e0ff440053ff9de27f459e5b1bcaee7aa67?
s=60&d=retro&r=g)

### 󠀁[Amazing Plugin](https://wordpress.org/support/topic/amazing-plugin-2652/)󠁿

 [E-LIQUIDS UK](https://profiles.wordpress.org/notblowingsmoke/) Octubre 2, 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.

 [ Read all 8 reviews ](https://wordpress.org/support/plugin/fast-woo-order-lookup/reviews/)

## Contributors & Developers

“Fast Woo Order Lookup” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ OllieJones ](https://profiles.wordpress.org/olliejones/)

“Fast Woo Order Lookup” has been translated into 4 locales. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/fast-woo-order-lookup/contributors)
for their contributions.

[Translate “Fast Woo Order Lookup” into your language.](https://translate.wordpress.org/projects/wp-plugins/fast-woo-order-lookup)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/fast-woo-order-lookup/),
check out the [SVN repository](https://plugins.svn.wordpress.org/fast-woo-order-lookup/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/fast-woo-order-lookup/)
by [RSS](https://plugins.trac.wordpress.org/log/fast-woo-order-lookup/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

= 1.3.0 March 3, 2026

Pick up and use extra search meta keys from the `woocommerce_order_table_search_query_meta_keys`
and `woocommerce_shop_order_search_fields` filters.

= 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.

## Community plugin

This plugin is developed and supported by a community. [Contribute to this plugin](https://github.com/OllieJones/fast-woo-order-lookup)

## Meta

 *  Version **1.3.0**
 *  Last updated **7 mesos ago**
 *  Active installations **300+**
 *  WordPress version ** 5.8 or higher **
 *  Tested up to **7.0.7**
 *  PHP version ** 5.6 or higher **
 *  Languages
 * [Dutch](https://nl.wordpress.org/plugins/fast-woo-order-lookup/), [English (US)](https://wordpress.org/plugins/fast-woo-order-lookup/),
   [French (France)](https://fr.wordpress.org/plugins/fast-woo-order-lookup/), [Turkish](https://tr.wordpress.org/plugins/fast-woo-order-lookup/),
   i [Ukrainian](https://uk.wordpress.org/plugins/fast-woo-order-lookup/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/fast-woo-order-lookup)
 * Tags
 * [database](https://bal.wordpress.org/plugins/tags/database/)[orders](https://bal.wordpress.org/plugins/tags/orders/)
   [performance](https://bal.wordpress.org/plugins/tags/performance/)[search](https://bal.wordpress.org/plugins/tags/search/)
   [woocommerce](https://bal.wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://bal.wordpress.org/plugins/fast-woo-order-lookup/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  8 5-star reviews     ](https://wordpress.org/support/plugin/fast-woo-order-lookup/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/fast-woo-order-lookup/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/fast-woo-order-lookup/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/fast-woo-order-lookup/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/fast-woo-order-lookup/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/fast-woo-order-lookup/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/fast-woo-order-lookup/reviews/)

## Contributors

 *   [ OllieJones ](https://profiles.wordpress.org/olliejones/)

## Support

Issues resolved in last two months:

     0 out of 1

 [View support forum](https://wordpress.org/support/plugin/fast-woo-order-lookup/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://github.com/sponsors/OllieJones)