Internal query names seem to be “unlimited” in length. Global ones defined in query view of the table editor appear to be limited to 40 characters in length.
What is the reasoning for this?
In complex app this limitation creates a lot of issues for us as it becomes very difficult to keep track of which query does what without a proper description. With a couple of filters and sorting rules applied 40 characters is not enough to explain what is going on.
I also found a link which seems to be pointing to a related problem in the past:
Just noticed that the API schema suggests that up to 255 characters should be possible as a query name… but if you try it now throws an error saying on 40 characters are allowed.