• I think Erikur's "red herring" is pretty accurate.

    I ran the data generator several times with trace flag 8690 on and several times with trace flag 8690 off.

    For TBL_SAMPLE_STRING the number of distinct string values was about 0.99 (range 0.9887 to 9893) times the number of non-null values, whatever the flag setting, with the flag off number being anything from 99.97% to 100% of the flag on number.

    For TBL_SAMPLE_TRANSACTION the number of distinct customer_detail values was about 0.24 times the number of non-null values; the number with the flag off was about 99.96% of the number with the flag on. (Whether 4 transactions per customer is a reasonable average may be arguable either way, but that's irrelevant to this discussion.)

    It seems quite clear that the number of duplicates is influenced too little by the flag setting to be distinguished from fluctuation natutrally caused by used of a PRNG in the generation process, at least on the amount of experimentation I am willing to do.

    The strange performance effect seem by mburbea may be something to do with the weird performance characteristics of streaming TVFs in some cases, as reported by Adam Machanic in this connect item, which still isn't fixed - - I seem to remember someone making a connection between that and trace flag 8690 a couple of years back, but I can't remember where or find any trace of the statement now so I may be imagining it.

    Tom