Quantcast
Viewing all articles
Browse latest Browse all 12963

Slow Insert, very non-linear scaling with size

I have an INSERT whose source is a SELECT that has 17500 rows. The INSERT is taking roughly 6 minutes. The SELECT by itself takes < 2 seconds. The odd thing is that if I restrict the SELECT to 3000 rows, the INSERT completes in less than 2 seconds. I tried two subsets of the source data, one with 3000 and one with 3600 rows. Each completes in seconds separately. But if I try the combined subset of 6600 rows, the insert time goes up to 3 minutes. Only difference is selecting by different date ranges in the source table.

I am testing with an empty target table on an idle server. SQL Server 2012 on Win Server 2012, 16G memory. Per-Row size is small, 100-200B. Exec. plan shows INSERT taking 60-70% (including index update - only have pk), but 6 mins is too long. Anyone have any ideas?


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>