I created a stored procedure. I get a cursor with a huge amount of data (about 1 row). After that, I call another procedure in it to do all the calculations associated with the necessary data. I create a temporary table and try to insert this calculated data into it. But it takes too long about 9.5 minutes. I want to know how to embed voluminous data using the smallest "INSERT" queries since 1L insert queries cause the lowest performance. Can anyone help me out?
You can use the following SQL statement for bulk insertion:
INSERT INTO TABLE_A (A, B, C, D) VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3), (4,4,4,4);
Your question is a bit vague, but you can BULK load data into mysql using
load data infile...
Check out the following links:
If you need to process data during loading, it is better to first load the mass into a temporary table and then run some stored procedures that process and populate your main tables.
Hope this helps.
You can also insert a record into a table in memory. After fully inserting into the memory table, the following code to insert many rows from the table into memory.
INSERT INTO TABLE_A (A, B, C, D) SELECT A,B,C,D FROM INMEMORY_TABLE DELETE FROM INMEMORY_TABLE
Source: https://habr.com/ru/post/1244235/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1244230/why-does-the-typings-tool-deliberately-create-duplicate-sets-of-typings&usg=ALkJrhg2fQ8dPLD_aQnJe2rPXAhC7HEcDwMake namedtuple accept kwargs - pythonDownloading images from a website (HTML form) using an iOS device (iPad, iPhone) - iosR gsub with special characters - regexUpdating values ββin a Map based on another map in Java - javaHow to add multiple headers with an Http window - androidHow can I capture some (but not all) member variables of a class with C ++ lambda - c ++How to configure Electron, Webpack, Babel, React and JSX? - reactjsGoogle User serverAuthCode nil in Objective-C - iosMy ajax request is sent once, then twice, then 4 times and the doubling continues - javascriptAll Articles