Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

SQL Server Undocumented Query Hint - QUERYTRACEON to on the trace flags in statement level

Sep 5 2011 2:03AM by Ramireddy   

Just learned from fabiano's article about this new undocumented query hint. "QUERYTRACEON", By using which we can switch on the trace flags with in a query statement. In below query we are applying traceflags 2389 and 2390 on below query. But this hint requires sysadmin privillege.

SELECT * FROM Sales.SalesOrderHeader
WHERE OrderDate >= Convert(date, GetDate())
OPTION(QUERYTRACEON 2389, QUERYTRACEON 2390, RECOMPILE)
Read More..   [82 clicks]

Published under: SQL Server Tips ·  ·  ·  · 


Ramireddy
2 · 41% · 12972
6
 
1
 
 
0
Incorrect
 
 
0
Forgotten



Submit

6  Comments  

  • Just be aware.... http://connect.microsoft.com/SQLServer/feedback/details/361334/the-querytraceon-option-is-not-documented

    commented on Sep 5 2011 4:39PM
    oeikli
    730 · 0% · 44
  • It would be more helpful if you could say something more about traceflags 2389 and 2390. eg. Why should I use it, its benefits. etc

    commented on Sep 6 2011 2:55AM
    Jignesh Desai
    142 · 1% · 338
  • Hi Jignesh,

    You can find the explanation of these trace flags in the link i mentioned as original source of this post. Fabiano explained about these trace flags in very much detail. click on the link "Learned from Blog Post written by Fabiano Amorim ", which is beside my picture at the end of the post.

    commented on Sep 6 2011 4:08AM
    Ramireddy
    2 · 41% · 12972
  • Got it, Thanks.

    Just that the link, little goes unnoticed.

    Regards

    commented on Sep 6 2011 4:36AM
    Jignesh Desai
    142 · 1% · 338
  • The article by fabiano focuses more on the statistics issues with the ascending columns than the querytraces. The issue was first reported by Gail Shaw more than 6 months back.

    http://sqlinthewild.co.za/index.php/2011/03/22/statistics-row-estimations-and-the-ascending-date-column/

    commented on Oct 7 2011 3:30AM
    Sachin Nandanwar
    488 · 0% · 76
  • Sachin,

    Yes the article is entire on a different topic, But i learned about feature "QUERYTRACEON" from the same article.

    Thanks for reading...

    commented on Oct 7 2011 5:20AM
    Ramireddy
    2 · 41% · 12972

Your Comment


Sign Up or Login to post a comment.

"SQL Server Undocumented Query Hint - QUERYTRACEON to on the trace flags in statement level" rated 5 out of 5 by 6 readers
SQL Server Undocumented Query Hint - QUERYTRACEON to on the trace flags in statement level , 5.0 out of 5 based on 6 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]