My question is regarding the Explain output. Please refer the below query and its Explain command output
Explain
update
test.table1 t1
join test.table2 t2
on t1.field1=t2.field1
and t1.field2=t2.field2
set t2.field3=t1.field3;
Below is the result of the EXPLAIN command.
I added a composite index on (field1, field2) to both table1 and table2, and then executed the query. After adding the index, the query performance improved significantly. Based on the output of the EXPLAIN command, I confirmed that the query is properly utilizing the index.
However, I have a question regarding the details of the EXPLAIN output. Specifically, there is no indication of index usage for table1. In the EXPLAIN output (please refer to the image), the key field for table1 is shown as NULL.
Does this mean that the index on table1 is not being used?
If so, how is the query executing so quickly? In other words, if no index is used on table1, what mechanism is allowing the matching process in table1 to perform so efficiently?
I am using MySQL 8.0.42

order by t1.field1, t1.fiel2, the index will be used.