There is a query being generated that is killing my search and causing an Internal Error after I added approx 70K records to a few relational tables. The query is listed below and any assistance would be greatly appreciated.
I tested the page with only adding 10k entries and after a slow load would eventually render, 70K+ and I get an internal error.
SELECT COUNT(DISTINCT t
.id
)
FROM tbl_user
t
LEFT OUTER JOIN tbl_states
state
ON (t
.state_id
=state
.id
)
LEFT OUTER JOIN tbl_profile
profile
ON (profile
.user_id
=t
.id
)
LEFT OUTER JOIN tbl_account_type
accountType
ON (t
.account_type_id
=accountType
.id
)
WHERE ((t.account_type_id=6) AND (t.status=1))
±—±------------±------------±-------±--------------±--------±--------±-----------------------------------±------±------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
±—±------------±------------±-------±--------------±--------±--------±-----------------------------------±------±------------+
| 1 | SIMPLE | t | ALL | NULL | NULL | NULL | NULL | 71067 | Using where |
| 1 | SIMPLE | state | eq_ref | PRIMARY | PRIMARY | 8 | manager_application_dev.t.state_id | 1 | Using index |
| 1 | SIMPLE | profile | ALL | NULL | NULL | NULL | NULL | 70588 | |
| 1 | SIMPLE | accountType | const | PRIMARY | PRIMARY | 4 | const | 1 | Using index |
±—±------------±------------±-------±--------------±--------±--------±-----------------------------------±------±------------+