mysql-Improve a join performance
I have a table
PCUI_treat(CUI1,CUI2), and I want to combine each value from CUI1 with all values from CUI2. So I use the
INNER JOIN like this:
select distinct t1.CUI1, t2.CUI2 from PCUI_treat t1 inner join PCUI_treat t2;
Indexes on CUI1 and CUI2 don't help here, right? How can I improve the performance?