I am not sure because I don't know how MySQL optimizes this procedure but did you think of generating the complete insert statements as a string and than writing them in 1 transaction?
Also the storage engine, the indexes and the version play a role
Hi j ,thank you for replying . I have checked with storage engine, the indexes etc. The thing is that the database where I am transforming it into MySQL normalization it uses PK which is varchar and some where clauses uses columns which have datatype binary. The final solution which I found is to write some transformation in SP and some in PHP code and do the bulk insert.