Sample Header Ad - 728x90

Reasons for not Globally enabling Trace Flag 2453 - Cardinality on Table Variables

3 votes
1 answer
588 views
I've been doing some reading on the improvements that Trace Flag 2453 can give on the performance of Table Variables by maintaining statistics and was wondering what would be the reasons you would advise to not turn this on globally. I understand there will be some overhead of recompiles if the number of rows being used substantially differs - but to me, this would appear similar to any other query, and be preferred behaviour if it is caching better query plans. Is there other reasons why this would not be preferred behaviour to generate statistics on table variables, similar to temp tables? Primarily I'm thinking about replacing a few places where we use XML to bring in data sets and use Table-Valued-Parameters instead. We do use temp tables for the most part.
Asked by crucible (307 rep)
Sep 24, 2018, 10:47 PM
Last activity: Oct 12, 2021, 08:18 AM