• I couldn’t find a current wordfence repo, or a place to submit patches or PRs.

    In ‘wordfence/lib/wfConfig.php’, on line 186, there is a line that has a query:

    "SHOW TABLES LIKE '%s'", $table

    Since WordPress happily makes 10 tables per blog on a multisite install, this can end up chewing up a lot of resources. If it’s changed to an equal instead of a like, it’s much less resource intensive, something like:

    "SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = '%s'", $table

    …Uly

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @ktzalt
    Thanks for your suggestion, I’ve logged this one to our dev team with internal reference number (#FB4010), although I’m not sure if this can be seen in an upcoming release or not, but all suggestions are evaluated by our dev team and considered seriously.

    Thanks.

    I would like to chime in agreeing with @ktzalt.

    Our multisite instance is very large, with thousands of blogs. The SHOW TABLES query was taking 1+ second to complete and causing notable slowness.

    Modifying the query to avoid using SHOW TABLES allows our pages to load 3-4x faster than otherwise.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wfConfig SHOW TABLES’ is closed to new replies.