Speed
The various techniques for generating test data have varying performance characteristics. As I've said, there is usually a tradeoff between randomness and speed when creating large data volumes. Table 6-1 below summarizes my informal testing of the techniques demonstrated in this chapter. I've included timings for using a simple WHILE loop to insert data in order to provide a frame of reference (timings are in milliseconds):
As you can see, the simplest techniques are the fastest, whereas the ones that produce data which tends to be more random take longer than the others. Note that all the techniques except for the Random()/ScrambleFloat() and INSERT…EXEC techniques outperform the WHILE loop technique. In my opinion, the best technique ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access