Sort:  

The blockchain is basically a database so it would just be to use the right query. As for speed and cpu-load I don't know any of that.