Question: I'm new to MySQL. The `GetFamilyTree(id)` function that Rolando suggested in the [Find highest level of a hierarchical field: with vs without CTEs](https://dba.stackexchange.com/questions/7147/find-highest-level-of-a-hierarchical-field-with-vs-without-ctes) question was great but when the id is greater than 999 it hangs. 

Is there a solution that works with larger ids?

Answer: 
<http://antapex.org/traceflags_sqlserver.txt>

Although this isn't complete, it is the biggest single list I know of.

This MSDN article lists the Query Optimizer Trace Flags necessary to support several changes to the QO in various QFEs and hotfixes, etc.

<http://support.microsoft.com/kb/974006>

Technet also has a list of various trace flags (probably already documented in the links above:

<http://technet.microsoft.com/en-us/library/ms188396.aspx>

This documents trace flag 610: <http://msdn.microsoft.com/en-us/library/dd425070%28v=SQL.100%29.aspx> (controls minimally logged inserts into indexed tables)

Technet has another huge list of trace flags at: <http://social.technet.microsoft.com/wiki/contents/articles/13105.trace-flags-in-sql-server.aspx>
Even though this is a pretty old thread, Microsoft has officially published the list of Trace Flags that can be used when running SQL Server 2012 and up for high performance workloads :

[`**KB - 2964518**`](https://support.microsoft.com/en-us/kb/2964518) - Recommended updates and configuration options for SQL Server 2012 and SQL Server 2014 with high-performance workloads.

Its highly advisable to do a thorough testing when enabling trace flags to [avoid any surprises](http://www.sqlcoffee.com/Tips0023.htm).