The first and easiest method is called the "flush and fill" technique.Basically, you remove all of the data from the Dimension table and fill it with data from an OLTP table.Additionally, Kevin has taught SQL Server, Business Intelligence, and Data Warehousing classes to hundreds of students over a period of five years and has built numerous custom courseware modules along the way.Kevin has authored one book on reporting development and contributed chapters on MDX programming to a second book.He is currently developing a set of commercial video training courses for SQL Server and BI topics.He has been a SQL Server MVP since 2010 and was previously a . Kevin is a frequent speaker at User Group and other community events (SQL Saturday, Share Point Saturday, Code Camp) in the Mid-Atlantic region, and speaks occasionally at conferences.When creating a dimension table in a data warehouse, a system-generated key is used to uniquely identify a row in the dimension. The surrogate key is used as the primary key in the dimension table.The surrogate key is placed in the fact table and a foreign key is defined between the two tables.
For more information, check out Kevin’s main site at
…and the CUSTOMER table contains 5,000, that the command will be executed 5,000 times, once for each row, because it deletes them one-by-one?
Also, if you use the DELETE command, your IDENTITY key does not automatically RESEED itself.
You would also need to explicitly reseed the identity field…An alternative to the delete command is the TRUNCATE command.
The nice thing about the truncate command is that it is executed only once, so it is much more efficient and it also automatically reseeds your identity key. Well, the truncate command deallocates data pages which internally store the data in SQL Server.