• Personally I would be more worried when a new query shows up, as opposed to similar queries being repeated. One solution to this could be banning ad-hoc queries completely and exposing everything through stored procedures. Security may not always be at odds with performance, but I think it is at odds with flexibility.