in reply to How to deal with a mass HoA

It is very slow when I load IDX.txt and search HoA (grep, sort ).

Using grep and sort in combination with a hash sounds like you might be doing something in a suboptimal way.  Could you post some code so we can see what exactly you're doing?  Just a thought...