Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert SP takes Forever
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2008 R2
Miscellaneous
Thread ID:
01632022
Message ID:
01632047
Views:
46
>>
>>3. Instead of IF EXISTS INSERT I suggest to use MERGE command. It should be much better.
>>
>
>After having worked with it for years, I steer people away from MERGE in OLTP systems. It was really designed for, and is better suited for, ETL loads in data mart/data warehouse scenarios.
>
>But your original point is valid - it's best to optimize the IF EXISTS check.

Here is what Alexander Kuznetsov wrote about it

http://sqlblog.com/blogs/alexander_kuznetsov/archive/2010/01/12/t-sql-tuesday-002-patterns-that-do-not-work-as-expected.aspx
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform