MySQL Power Index not working

I perform a simple left join request between relatively small tables (~ 5000 rows):

select *
from table1
left join table2 
force index (index_table2_on_name) for join 
on table1.name = table2.name

index_table2_on_name exists, but Mysql refuses to use it. Performing an explanation of the query returns: select_type = SIMPLE, type = ALL and possible_keys = NULL for both tables.

Any idea?

+3
source share
1 answer

Found a problem. It looks like table1.name and table2.name have different character sets. It is strange that Mysql ignores the index instead of using a transform.

+6
source

Source: https://habr.com/ru/post/1789178/


All Articles