I've created a stored procedure. I fetch cursor with huge amount of data(around 1L rows). After that I call another procedure in it to do all calculations related to needed data. I create temporary table and try to insert this calculated data in it. But it takes too long about 9.5 mins. I want to know how to insert bulk data by using least "INSERT" queries as 1L insert queries cause poorest performance. Can anyone help me??
3 Answers
Your question is a bit vague but you can BULK load data into mysql using
load data infile... Check the following links:
If you need to process the data during the load it might be better to first bulk load the data into a temporary table then run some stored procedures against it which process and populate your main tables.
Hope this helps.