Would anyone know if you get the same amounts of reads when bulk inserting from SSIS with an OLEDB adapter, into a heap vs an empty, clustered, table?
I've played around with this, and I see that I get some 400 reads when writing to a heap VS 100.000 reads when writing to the same table with a clusted index with TF610 on, and some 400.000 reads with writing without the TF610.
My preliminiary conclusion is that you can't beat inserting data into a heap. However, I thought that you could get the same throughput/performance with a clustered index if the target was empty and the non CI were disabled.
Target Table Checklist:
1. Database recovery model is either BULK LOGGED or SIMPLE.
2. Account used to connect to SQL server is effectively granted the BULK OPERATIONS privilege on the server.
3. Target table is empty.
4. Ideally, non-clustered indexes are disabled.
SSIS Checklist:
1. Pipeline data is ordered according to table’s clustered index.
2. SQL Destination (faster) or OLEDB Destination (more flexible) component is used.
3. Table Lock is checked on destination component
4. Names of clustered index columns is provided in the Order box (BulkInsertTabLock = True)
5. Complete entire load in a single operation (MaxInsertCommitSize = 0).
I've been using the following articles
http://technet.microsoft.com/en-us/library/dd425070(v=sql.100).aspx
http://sql10.blogspot.no/2010/07/ssis-check-list-for-minimally-logged.html
I've played around with this, and I see that I get some 400 reads when writing to a heap VS 100.000 reads when writing to the same table with a clusted index with TF610 on, and some 400.000 reads with writing without the TF610.
My preliminiary conclusion is that you can't beat inserting data into a heap. However, I thought that you could get the same throughput/performance with a clustered index if the target was empty and the non CI were disabled.
Target Table Checklist:
1. Database recovery model is either BULK LOGGED or SIMPLE.
2. Account used to connect to SQL server is effectively granted the BULK OPERATIONS privilege on the server.
3. Target table is empty.
4. Ideally, non-clustered indexes are disabled.
SSIS Checklist:
1. Pipeline data is ordered according to table’s clustered index.
2. SQL Destination (faster) or OLEDB Destination (more flexible) component is used.
3. Table Lock is checked on destination component
4. Names of clustered index columns is provided in the Order box (BulkInsertTabLock = True)
5. Complete entire load in a single operation (MaxInsertCommitSize = 0).
I've been using the following articles
http://technet.microsoft.com/en-us/library/dd425070(v=sql.100).aspx
http://sql10.blogspot.no/2010/07/ssis-check-list-for-minimally-logged.html
Henrik Fyhn http://repeatableread.blogspot.com/