I am trying to get the comments on posts with a specific tag which include a phrase or a keyword of interest using SEDE. Here's my first attempt: https://data.stackexchange.com/stackoverflow/query/1782303/search-comments-by-tags-and-a-keyword
SELECT C.Id AS [Comment Link], C.Score [Score], C.Text [Text] FROM Comments C inner join Posts Q on Q.Id = C.PostId inner join PostTags PT on PT.PostId = Q.Id inner join Tags T on T.id = PT.TagId WHERE UPPER(C.Text) LIKE UPPER('%##CommentText##%') AND T.TagName = ##tag:string?r## ORDER BY Score DESC
However, this keeps returning an error:
Line 0: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
How can I optimize this query?