Project

General

Profile

Actions

Bug #92485

closed

Missing index on fe_login felogin_forgotHash - long sql requests

Added by Tymoteusz Motylewski over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Category:
felogin
Target version:
-
Start date:
2020-10-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Due too missing index in the fe_login felogin_forgotHash column, on big databases > 100k feusers queries to forgot password takes a long time to process.

An index to fe_users should be added:

ALTER TABLE fe_users ADD INDEX felogin_forgot_hash (felogin_forgotHash);

Without the index on the big db the queries take several seconds:

UPDATE `fe_users` SET `password` = ?, `felogin_forgotHash` = ?, `tstamp` = ? WHERE `felogin_forgotHash` = ?
^^3895 ms

SELECT * FROM `fe_users` WHERE (`felogin_forgotHash` = ?) AND ((`fe_users`.`disable` = ?) AND (`fe_users`.`starttime` <= ?) AND ((`fe_users`.`endtime` = ?) OR (`fe_users`.`endtime` > ?))) LIMIT ?
^^2582 ms

SELECT COUNT FROM `fe_users` WHERE (`felogin_forgotHash` = ?) AND ((`fe_users`.`disable` = ?) AND (`fe_users`.`starttime` <= ?) AND ((`fe_users`.`endtime` = ?) OR (`fe_users`.`endtime` > ?)))
^^874 ms

Actions #1

Updated by Tymoteusz Motylewski over 3 years ago

  • Description updated (diff)
Actions #2

Updated by Georg Ringer over 3 years ago

  • Status changed from New to Accepted
Actions #3

Updated by Gerrit Code Review over 3 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66055

Actions #4

Updated by Gerrit Code Review over 3 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66115

Actions #5

Updated by Tymoteusz Motylewski over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF