Posts Tagged ‘tips’


The purpose of Merge is where you have two tables – maybe a transaction table and a staging table which could have records to be inserted and/or replaced in the transaction table.  Or maybe you have two tables of people (staff or patients) – one table (the master) with last years data and one table from this year, and you want to bring the master up to date with additions, updates or removals. Under SQL 2005 you would have had to


Whenever you INSERT data into SQL tables, as each row is added, it also updates the index data on a row by row basis.  So a table with 15 indexes will actually update 16 rows (1 data and 15 index rows) for each insert. Where you are inserting thousands of rows, this can make for MASSIVE log files and LONG processing times. So, to make insertion super fast, always a good idea to DISABLE non-clustered indexes (those indexes which