• Resolved sirrahikkala

    (@sirrahikkala)


    I have three sites with same database and while investigating with slow query log whats bogging down, I found out that all sites reported this as slowest:

    SELECT
    *,
    CASE WHEN type = ? THEN ? WHEN type = ? THEN ? WHEN type = ? THEN ? WHEN type = ? THEN ? WHEN type = ? THEN ? WHEN type = ? THEN ? WHEN type = ? THEN ? WHEN type = ? THEN ? WHEN type = ? THEN ? ELSE ? END AS typeSort,
    CASE WHEN type = ? THEN parameters WHEN type = ? THEN parameters WHEN type = ? THEN IP WHEN type = ? THEN IP WHEN type = ? THEN IP WHEN type = ? THEN IP WHEN type = ? THEN IP WHEN type = ? THEN IP WHEN type = ? THEN IP ELSE ? END AS detailSort
    FROM
    ******wfblocks7
    WHERE
    type IN (?)
    AND (
    expiration = ?
    OR expiration > UNIX_TIMESTAMP()
    )
    ORDER BY
    typeSort ASC,
    id DESC

    I have tried to deactivate and reactivate with delete tables option but that did not change. Also repairing the table wont work since it’s InnoDB.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey @sirrahikkala,

    Are you able to share the size of the wfBlocks table while you’re noticing this? This is where blocked IPs are stored and could possibly grow in depending on how many lockouts are occurring.

    Please let me know.

    Thanks,

    Gerroald

    Thread Starter sirrahikkala

    (@sirrahikkala)

    64KiB. Other site has only one line and other has two entries.

    Hey @sirrahikkala,

    Can you send me a Diagnostics report so I can get a better overview of your environment? Please navigate to Wordfence > Tools > Diagnostics. Here you can select SEND REPORT BY EMAIL. Please include your www.remarpro.com username and update this thread after you’ve sent it.

    Please let me know.

    Thanks,

    Gerroald

    Thread Starter sirrahikkala

    (@sirrahikkala)

    @wfgerald done!

    Hey @sirrahikkala,

    Thanks for sending that over!

    I don’t see anything glaring, with the exception that your MySQL version is a bit old, released in 2013, but still supported until February 2021.

    Even though it’s still supported can you please ask your host to upgrade you to a more modern version?

    Then, completely reset Wordfence and let me know if the issue persists? If it does, I’ll bump the developers for their thoughts.

    https://www.wordfence.com/help/advanced/remove-or-reset/#remove-or-reset

    Please let me know.

    Thanks,

    Gerroald

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Slow sql queries with wordfence’ is closed to new replies.