I am inserting data into the table tblTextData using Insert Activity but this activity taking too much time to execute
Here, TextDT datatable is having 2 lac records and this insert activity took 10 mins to insert the data.
Can anyone explain me what might be the reason?
Thanks
Today I cleared all the records in table tblTextData and ran the above insert query in local database, it took 1 min 15 secs and it inserted 2lac records
I did the same thing in production db, cleared the table and ran the bot there it is took 9 min 54 secs and it inserted 2lac records
In both cases the table structure and indexes, everything is same
Hi @Karun
Actually its not taking much time, as we have around 2 lakh records
May be it might be due to database server we use is slower to insert the record…
Cheers
No worries, we have something called bulk insert
Fine try to use a bulk insert statement as mentioned here
have that script in a text file, read it with read text activity and get the output as a string variable and pass it to the insert query activity
Kindly try this and let know buddy
Cheers @Karun
just we need to keep this in a text file
read that text with READ TEXT activity and get as string output
and pass the string variable to the insert query
Simple buddy
Cheers @Karun
yes once after writing the text file with script between double quotes
save that file
and pass that file path to READ TEXT activity and we will be getting a string variable
now pass that string to insert query
Cheers @Karun
Today I cleared all the records in table tblTextData and ran the above insert query in local database, it took 1 min 15 secs and it inserted 2lac records
I did the same thing in production db, cleared the table and ran the bot there it is took 9 min 54 secs and it inserted 2lac records
In both cases the table structure and indexes, everything is same
i think this should be in vice versa…
production should be faster and the local database must be slower comparatively
and this is how it should be as the production environment is set in that way only to take up things faster
i think when you were running the same bot to insert into the production db, that table must be used by some process in the production at that time…kindly check with the db team, the difference between the local database schema structure and the production db
and get the logs and execution time,
That must solve the issue for sure buddy
Cheers @Karun