Fast Woo Order Lookup

تفصیل

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 runs 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 very slow query (to be fixed in Woocommerce 9.0.0) to look up meta_keys. This fixes that query’s performance too.

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

انسٹال کرݨ

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

ہرہک دے سوال

What’s the background for this?

See this WooCommerce issue for an example of the performance problem store owners have. See this Subscriptions issue for another example.

What’s the fix?

Build a trigram lookup table, maintain it, and use it for the queries.

How much space does the trigram lookup table 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.

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.

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.

What is this wp_fwol table created by the plugin?

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

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 tens of 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.

ریویو

اکتوبر 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!
اکتوبر 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.
ستمبر 14, 2024 1 reply
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.
ستمبر 3, 2024
I’ve had very slow wp-admin and woocommerce admin pages for a while now. Query monitor plugin showed a very high number of database queries from the woocommerce plugin. No idea why. Installing this plugin and Index WP mySQL For Speed plugin has immediately reduced the very high number of queries and sped up both wp-admin and woocommerce admin pages. Thank you very much and I hope my admin stays working this quick !
جولائی 19, 2024 1 reply
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.
سارے 5 ریویو پڑھو

Contributors & Developers

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

حصہ پاوݨ آلے

“Fast Woo Order Lookup” has been translated into 3 locales. Thank you to the translators for their contributions.

“Fast Woo Order Lookup&#8221 دا آپݨی زبان وچ ترجمہ کرو۔

ڈیویلپمنٹ وچ دلچسپی ہے؟

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

تبدیلی لاگ

1.1.3 October 7, 2024

Handle tables and colums with character sets other than $wpdb->charset.

1.1.1 August 12, 2024

  • Limit batch runtime to 25 seconds. Include a cronjob shell script to purge stale ActionScheduler actions.

1.1.0 August 11, 2024

  • Some MariaDB / MySQL versions implicitly cast integers to latin1 strings causing problems. Explicit casting fixes the issue.