Speed

for RuBoard

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 for producing reasonably random test data as quickly as possible is the doubling technique. It's ten times as fast as the Random() technique and nearly three times as fast as a plain WHILE loop. It's the technique I use most often myself when I need to create test data.

for RuBoard


The Guru[ap]s Guide to SQL Server[tm] Stored Procedures, XML, and HTML
The Guru[ap]s Guide to SQL Server[tm] Stored Procedures, XML, and HTML
ISBN: 201700468
EAN: N/A
Year: 2005
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net