Sorting custom attribute in RTC query

Accepted answer

It seems you can't sort by a Large HTML attribute, regardless of whether it's a custom or built-in attribute (for example, you can sort by Summary which is of type Medium HTML, but not Description, which is Large HTML).
Comments

I think the limitation is due to how Large String and Large HTML are stored in the database. There is no efficient way to pull the data of these types and sort them. Assuming that the content cannot be accommodated in a Medium HTML attribute which holds 1000 bytes of XML text (including tags), the length of the content is more than 1000 bytes. Does it really make sense to sort them? If absolutely necessary, probably use a different attribute for sorting, or add a new attribute to hold the first XXX bytes of the Large HTML attribute for sorting.