WPIntell

Source evidence

Slow query needing an index

Login Lockdown & Protection · support · 2025-07-22T00:19:00+00:00

complaintsentiment
highseverity
0.82relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

8 / 34 rows with source links

23.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

26 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
justink resolved
I am helping someone with a slow site, and I believe a query from this plugin is causing some of the slowness. The site is using login-lockdown version 2.13 and the query looks like: Query_time: 10.000596 Lock_time: 0.000001 Rows_sent: 1 Rows_examined: 2874703 SELECT COUNT(login_attempt_ID) FROM wp_login_fails WHERE login_attempt_date + INTERVAL 1 MINUTE > '2025-07-21 15:05:24' AND login_attempt_IP = '120.138.19.65'; The ‘login_attempt_date’ column is being modified with a ‘+ interval 1 minute’ so cannot benefit from an index, however ‘login_attempt_IP’ absolutely can. Adding an index like: mysql> alter table wp_login_fails add index login_attempt_IP (login_attempt_IP); Query OK, 2874909 rows affected (43.95 sec) Records: 2874909 Duplicates: 0 Warnings: 0 Drops the query from 2.8 million rows examined and 10 second runtime, to 85 rows examined and 0.07 seconds runtime. Can this index be applied to future versions of the plugin so everyone can benefit? This query seems to be spawned from login-lockdown/libs/functions.php, in static function countFails. I checked the settings to see if data was being retained too long, making the table unnecessarily large, however I couldn’t find a setting about data retention time. Is there a setting? Thanks! Justin Definitely! Thanks for the detailed suggestion. We will add it in the next update 🙂 This reply was modified 10 months, 1 week ago by Alexandru Tapuleasa .

Comments

1 shown
Alexandru Tapuleasa 2025-07-22T06:57:00+00:00

Definitely! Thanks for the detailed suggestion. We will add it in the next update 🙂 This reply was modified 10 months, 1 week ago by Alexandru Tapuleasa .