Skip to content
Advertisement

How to increase performance when inserting more than 40k+ rows

My attempt:

Currently, I am inserting a few records and it is giving exact results but in actuality, there are 40k+ records so I believe it will give performance issues also. Is there any way to insert the records faster because I will write a procedure for this insertion? Is there any other in which I can write an insert query inside the procedure?

Advertisement

Answer

On my laptop, we can scale your test easily enough

So around 3 seconds for 800,000 rows. I think you’ll be fine 🙂

If the lookups are always true and key preserved, you might get some benefit converting to a join, eg

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement