October 1, 2014 at 9:46 am
Hi there,
I have searched a long time and still haven't found the answer to my problem.
Our Dynamics AX is generating queries with the query hint OPTION (FAST x), which sometimes forces a bad execution plan to be used.
The devs say it is by default and is hard to change (has to be fixed on all forms potentially).
So I was after a way to override these hints using trace flags. I found the lovely trace flag 8722 which is claimed to make SQL Server ignore some query hints, especially the ones in the OPTION clause.
However, this doesn't work in my case. I tried to enable trace flag 8602 (disable index hints) as well, but my query is still running with the FAST x hint (it is much slower than when I actually remove the OPTION clause).
I tried to clear the plan cache as well, to no avail.
Any ideas? Am I missing anything?
P.S. I enabled the trace flags globally
October 1, 2014 at 10:59 am
If you come up with something let me know!! 🙂
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
October 2, 2014 at 1:48 am
Oh, I will for sure... but for the time being, it looks like I'll have to make a support call to Microsoft 😉
October 3, 2014 at 5:08 am
Paul White himself replied to my question on StackOverflow/StackExchange. The gist of it: that trace flag isn't really supported anymore apparently, so the initial code should be fixed.
Here is the link to the details: http://dba.stackexchange.com/questions/78306/t-sql-option-fast-x-and-trace-flag-8722
Thank you for your help.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply