Hello thank you for your response. I don't speak Portuguese but with the help of google translate I will try to respond.
You can sort on texts, you are not limited to numbers. Even if values are not unique. I did put an example for sorting per date where you have the same unicity issue. That issue can be solved by having 2 sorts.
Databases will create different type of indexes, sometimes more then one for the same field. In this post I used B trees as those are simple to explain and and most indexes uses a similar logic. So having a pagination with a sort on a text field with this method is going to be faster.
This method of sort will of course not work in all cases, but in that case as I explained you need to limit the max page. If you are not doing that you are doing it wrong. Most CMS's or tools actually don't do it. If you use something like ElasticSearch, this is done for you, you can't get any document past the 10000 mark using pagination.