Data Deployment Error: ClientInputError : Failed to read query. Exceeded max size limit of 20000 with response size 20001

When doing a data deployment, Salesforce may return the following error:

“ClientInputError : Failed to read query. Exceeded max size limit of 20000 with response size 20001”
 

Salesforce has a limit of 20k characters for SOQL queries. If your query is longer than that, you will receive the error above. 

To solve this issue, you will need to reduce the length of your query. Try to keep your query filter under 500 characters and the number of fields under 100.

How did we do?