SELECT Txt.query_text_id , Txt.query_sql_text , Pl.plan_id , Qry.* FROM sys.query_store_plan AS Pl JOIN sys.query_store_query AS Qry ON Pl.query_id = Qry.query_id JOIN sys.query_store_query_text AS Txt ON Qry.query_text_id = Txt.query_text_id WHERE Txt.query_sql_text LIKE '%SEARCH%';