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: