Super Speedy Search latest updates have made postmeta search even faster than before, about 3 seconds against a million products.
But – 3 seconds is still quite slow, and if you remove the meta search then the SQL query is blindingly fast – negligible load on your server.
It seems in the majority of cases, users are enabling the _SKU meta item to be searched and not really using meta search for anything else. Because of this, I think there may be a sort of cheat I can implement to speed search up further.
What I’m thinking is that many stores will have a prefix or a pattern of some kind for their SKUs –
* Maybe SKUs are always a minimum length?
* Presumably SKUs are always 1 word?
* Maybe SKUs have some kind of pattern – like they always start with Super Speedy Plugins or something similar for your store?
What I’m thinking is that I could add a pattern test to the search string to check if postmeta should be searched at all, and if the pattern test fails then skip searching postmeta.
For example, you could configure: Super Speedy Plugins* as the pattern for your metadata searches to be activated and then if a user searches for “Dell Monitor” it would skip checking postmeta. If a user searches for Super Speedy PluginsX1023 then it *would* search postmeta.
The idea being that this would speed up product search massively for your users who are probably mostly not entering SKUs – I’m presuming again that this addition of SKU search is actually mostly for the benefit of your site admins?
Please provide as much info as possible to help here so I can make Super Speedy Search *even* faster than it already is!