-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed
Description
Preconditions
- Any Magento version between 1.0 and 2.2
Steps to reproduce
- Call
$subscriber->loadByEmail($email)
with debugger or profiler - Inspect SQL query
- Inspect execution plan
EXPLAIN SELECT * FROM newsletter_subscriber WHERE subscriber_email='...'
Expected result
- An index should be use to retrieve the subscriber instantly
Actual result
- No index is used, resulting in a slow "Using where" query like this:
+----+-------------+-----------------------+------+---------------+------+---------+------+-------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-----------------------+------+---------------+------+---------+------+-------+-------------+
| 1 | SIMPLE | newsletter_subscriber | ALL | NULL | NULL | NULL | NULL | 75735 | Using where |
+----+-------------+-----------------------+------+---------------+------+---------+------+-------+-------------+
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed