cancel
Showing results for 
Search instead for 
Did you mean: 

Customer Login by Mobile number - Facing issue in mysql query

Customer Login by Mobile number - Facing issue in mysql query

Hello All,

I have implemented customer login by mobile number(with OTP) module in magento MCC (2.4.x). During a customer login in frontend by mobile the query is taking 10sec to complete.
"Mobile" attribute is available from "customer_entity_varchar" table.
The same query / logic is working fast in Open source Magento(2.1.9) with MariaDB (1 sec). Below is my query,

SELECT `e`.*, `at_mobile`.`value` AS `mobile` FROM `customer_entity` AS `e` LEFT JOIN `customer_entity_varchar` AS `at_mobile` ON (`at_mobile`.`entity_id` = `e`.`entity_id`)  AND (`at_mobile`.`attribute_id` = '233') WHERE (at_mobile.value = '1234567891');

 

Can any please provide your suggestion for improvement. Either query level change (or) Database configuration... etc is required ?. 

Thanks in Advance.