Home > Software design >  Very slow inner join query
Very slow inner join query

Time:12-13

I need to optimalize this query for being fast (takes around 10 minutes)

UPDATE year_2021 t1 
        INNER JOIN pricelist t2 
             ON t1.material = t2.material
SET t1.rabat = t2.rs

Table year_2021 have 30k rows and table pricelist have 60k rows.

Is it really ok, this query takes 10 minutes or it is wrong?

Thank you!

CodePudding user response:

On pricelist have INDEX(material, rs)

  • Related