Skip to main content
Notice removed Reward existing answer by reneMod
Bounty Ended with zcoop98's answer chosen by reneMod
deleted 8 characters in body
Source Link
M--
  • 3.1k
  • 14
  • 39

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 my 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.

AmHow can I missing something in myoptimize this query?

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 my 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.

Am I missing something in my query?

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?

Notice added Reward existing answer by reneMod
Bounty Started worth 500 reputation by reneMod
Source Link
M--
  • 3.1k
  • 14
  • 39

Search for comments on posts with a certain tag based on a keyword

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 my 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.

Am I missing something in my query?