Remove sub-string from WHERE clause
If you can't modify the schema per db2's answer, then try:

WHERE 
       ColumnAA LIKE @VariableA + '%' 
   AND LEN(@VariableA) &gt;= 17          -- safety check


Note that if @VariableA is shorter than 17 characters, then you may match unwanted strings using just a LIKE.  For example, 'The quick brown fox jumped over the lazy dog.' is LIKE 'The%', but that doesn't satisfy the requirements of your original SUBSTRING query.

Aaron also brings up a good point that the DISTINCT may be the ultimate culprit.  Why do you have it in there?  Is it something that should be replaced with an appropriate unique index?