denismart
denismart

Reputation: 582

mysql sort string max length

I got problem with sorting large strings in mysql. For example ORDER BY with string with length of VARCHAR(1000) does no effect. Butt at length of VACHAR(100) it works fine.

I using 10.5.17-MariaDB.

May be exist inner mysql variable that limits sorting length.

Upvotes: 0

Views: 290

Answers (1)

denismart
denismart

Reputation: 582

Regards to RiggsFolly and Raymond Nijland, here is the answer for my question:

Just need to add SET SESSION max_sort_length = <number> before runing query, for example:

SET SESSION max_sort_length = 1000;

Upvotes: 1

Related Questions