Using NHibernate, how can I check if the query I am executing already exist in the query cache or not programmatically?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at http://msdn.microsoft.com/en-us/library/ms174283.aspx. This article has a sample which retrieves the query plan for a specific query (under section ‘A. Clearing a query plan from the plan cache’):
This however is not integrated into NHibernate and you will have to know the SQL code for your query.