You need to sign in to do that
Don't have an account?
Jeffrey Zhang
tips on managing long soql queries
Was wondering if there is any good sample code for java on how to split up queries with giant 'where' section, because I ended up hitting the 20,000 character limit error.
stateMessage='ClientInputError : Failed to read query. Exceeded max size limit of 20000 with response size 20001'
Thanks!
stateMessage='ClientInputError : Failed to read query. Exceeded max size limit of 20000 with response size 20001'
Thanks!
Or it is because you have to many fields on your object and querying them all. The best practice is to have short api names. Try renaming them if you can. Try to remove unnecessary fields from your query too. For instance if it is for a backup and you have formula fields refering to other fields of your record, it is not necessary to have this field in your query as you can reconstruct that data with other fields.
Try to minify your query too, removing unnecessary space, carriage returns, tabs...