Home > database >  Mysql foreign key associated query type for ALL
Mysql foreign key associated query type for ALL

Time:09-28

There is a table for two foreign keys, as shown in the following such as



Is associated with the explain analysis, connection customer_source_id this table query, type for eq_ref, is normal, as shown in figure:


But in the query customer_type_id associated with this form, the type is ALL, as shown in figure:


If only the query lc_customer_type primary key, can normal use index, as shown in figure:


What reason is this? Is lc_customer this table has a problem or lc_customer_type has a problem?

CodePudding user response:

The left and the right connections, understand later knew why, give priority to with a query

CodePudding user response:

Under the understanding about the connection
  • Related