August 6, 2013 at 10:29 am
Hi Experts -
I am using SQL MERGE for Update / Insert in my script for a table which has around 40 Millions of data and everyday, can expect up to 10 - 15 Lacs of data.
Please suggest if MERGE is the best way to update / insert large volume of data. If not, please suggest.
Thank You!
August 6, 2013 at 10:33 am
It depends. If the two tables you're merging have the same clustered index/key, MERGE can be very efficient, it's certainly quite clean code-wise, but generally speaking, separate INSERT and UPDATE statements give the optimiser more choices.
Try both, see what performs best.
August 6, 2013 at 10:39 am
Yes - both have the same Clustered Index, the one from where I either update / insert is a Temp table and I create index on the fly every time.
Sure - let me try individual update / insert as well and will see which one suits better.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy