Jeff Moden (3/23/2012)
Gianluca, my ol' and trusted friend,
Very nice and well written article with lots of well fomatted, easy to read, documented code. Nicely done.
Thanks, you're very kind, as usual.
Shifting gears, I have a couple of questions, please.
1. What is the configuration and speed of the computer you did the testing on?
2. Which edition and version of SQL Server and Windows did you run your tests on?
3. When you did your duration testing, where did you have the result set return to? A table? Grid mode on the screen? A throw-away variable? or ???
4. When you did your duration testing, how did you measure the duration? STATISTICS TIME ON? SQL Profiler? or ???
5. When you did your duration testing, what was the configuration of your test table? Single column of dates? Indexes or not?
6. Is there any chance of you attaching your test data generator and your test harness to this thread so I can make sure that my testing is done the same way you did it?
7. Since I don't even know how to spell C#, would it be possible for you to script the CLR assembly out in a "Paul White" fashion so that I could install it on my machine for a little testing of my own?
1. Computer specs:
CPU: Intel i7 2820QM quad-core w/ hyperthreading @2.30 GHz (3.2 GHz with turbo boost)
RAM: 16 GB
DISK: 7200 RPM
And now the tricky part: actually it's a virtual machine with the following configuration:
CPU: 2 cores
RAM: 2 GB
DISK: Virtual dynamic disk on 7200 RPM physical disk
OS: Windows 2008R2 x64 Enterprise Evaluation
RDBMS: SQL Server 2012 RC0
3. A throw-away variable
4. A trace
5. Single column table, with no indexes.
6. Attached to this post.
7. Attached as well.
I'm repeating the tests using this test harness, but it definitely takes time. The code repeats the tests on 10K, 100K and 1M rows for each method and that takes about 2 hours on my machine (excluding the recursive ITVF that would take waaaaay too long).
I'll post the results as soon as I am ready.
Thanks again, Jeff! I hope you find something I overlooked. ;-)
How to post T-SQL questionsspaghettidba.com@spaghettidba