I was listening to a Plural Sight course from Kimberly Tripp. She stated that most Ad-hoc query statements are not 'safe', meaning not cached for re-use. And she also stated that an ad-hoc query with more than one Table in the From clause is not safe. And also that if there is an exact textual match, the query plan will get re-used.
I had never heard of the term 'safe' (with regards to query plan reuse) and couldn't find anything on this when I googled it. Is this a standard term?
I tried this in SQL 2014. I ran some ad-hoc queries, some with one table in the from clause and some with more than one table in the from clause. The number of tables made no difference. If the exact same statement (i.e. exact same text) was re-ran, the query plan was reused, otherwise it wasn't reused. So I'm wondering if I've misunderstood something or what.