June 23, 2023 at 5:34 pm
The measurements for the code above includes the table allocation as well as the WHILE loop and the final SELECT? In the code above the STATISTICS TIME, IO only seem to be applied to the INSERT INTO #Primes(Prime)
I took the total time (10 seconds) from the time given in SSMS application. In the messages it reports the time from statistics for the first insert and then the time for each iteration of the loop is printed in the messages.
June 23, 2023 at 5:48 pm
Can't see Jonathan's reply without a paging bump
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 23, 2023 at 6:36 pm
I took the total time (10 seconds) from the time given in SSMS application. In the messages it reports the time from statistics for the first insert and then the time for each iteration of the loop is printed in the messages.
When I run the WHILE loop with the fnTally based [dbo].[GENERATE_SERIES] function it beats the 2 tally method by about 3x. Nicely done
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
Viewing 3 posts - 76 through 77 (of 77 total)
You must be logged in to reply to this topic. Login to reply