none
Trace Flag 4135 SQL Server 2008

    Question

  • Does anyone have any idea what this flag does? There is no reference to it on MSDN. It is not a part of the article that lists available trace flags in 2008.

    There is a KB article that recommends that it is turned on to resolve a specific issue with SQL Server 2008 that we have run into, but we would like to at least know what this flag does before enabling it.

    http://support.microsoft.com/kb/960770

    Wednesday, July 8, 2009 2:00 PM

Answers

  • The response I got back was this:

    The traceflag disables an optimization in the query optimizer. The
    optimization caused the issue described in the KB article when you try to
    insert into a table by selecting from the table itself.

    As turning on the traceflag could result in a perf degradation, you only
    should use it if you run into the issue described in the KB article.


    The trace flag was added to SQL Server to disable a specific optimization type in the query optimizer.  If you have the exact problem listed in the article, the trace flag will prevent the problem from occuring.
    Jonathan Kehayias
    http://sqlblog.com/blogs/jonathan_kehayias/
    http://www.twitter.com/SQLSarg
    http://www.sqlclr.net/
    Please click the Mark as Answer button if a post solves your problem!
    • Marked as answer by lnediger Wednesday, July 8, 2009 9:05 PM
    Wednesday, July 8, 2009 8:46 PM
    Moderator

All replies

  • Unfortunately, you are going to have a hard time finding information on this or any undocumented trace flag.  Your best option would be to open a support case and request further information on it.  Trace flags are owned by individual groups in the SQL Server team, and the team that owns this flag is likely the only group that can really say what it does.  That being said, I have asked for further information from Microsoft in the MVP group and will let you know what I find out.  I've seen the topic of trace flags discussed a number of times and the result is rarely beneficial.  Since this one is listed in a KB article, it might get better explanation.
    Jonathan Kehayias
    http://sqlblog.com/blogs/jonathan_kehayias/
    http://www.twitter.com/SQLSarg
    http://www.sqlclr.net/
    Please click the Mark as Answer button if a post solves your problem!
    Wednesday, July 8, 2009 4:20 PM
    Moderator
  • The response I got back was this:

    The traceflag disables an optimization in the query optimizer. The
    optimization caused the issue described in the KB article when you try to
    insert into a table by selecting from the table itself.

    As turning on the traceflag could result in a perf degradation, you only
    should use it if you run into the issue described in the KB article.


    The trace flag was added to SQL Server to disable a specific optimization type in the query optimizer.  If you have the exact problem listed in the article, the trace flag will prevent the problem from occuring.
    Jonathan Kehayias
    http://sqlblog.com/blogs/jonathan_kehayias/
    http://www.twitter.com/SQLSarg
    http://www.sqlclr.net/
    Please click the Mark as Answer button if a post solves your problem!
    • Marked as answer by lnediger Wednesday, July 8, 2009 9:05 PM
    Wednesday, July 8, 2009 8:46 PM
    Moderator
  • Perfect, thank you for the assistance.
    Wednesday, July 8, 2009 9:05 PM