Many people have published high performance, read-less, Inline Table Valued functions that use Itzik Ben-Gan's wonderful "Virtual Numbers Table" to replace WHILE loops and other forms of RBAR. This one is Jeff Moden's version.
2019-08-13 (first published: 2019-08-04)
6,797 reads
A fast table valued function to generate a list of prime numbers within the range specified by the parameters.
2017-04-12 (first published: 2017-03-30)
404 reads
An article about tally tables, N-Grams and the fastest character-level N-Grams function available today for SQL Server.
2018-11-22 (first published: 2016-06-23)
15,294 reads
A fun, but simple tally table for April 1.
2016-04-01 (first published: 2016-03-23)
846 reads
Use ROW_NUMBER() to efficiently generate a tally table.
2013-06-13 (first published: 2013-05-30)
2,657 reads
The Tally Table has proven to be a simple and elegant method for avoiding many varieties of RBAR. Unfortunately, one of its more common uses, that of a CSV splitter, has a well-known and serious performance problem. MVP Jeff Moden shows us what that problem is and how to correct it. (UPDATED with additional info and attachments on 5/12/2011).
2012-12-28 (first published: 2011-05-02)
136,792 reads