Statistics for Efficient Range and Join Query Processing in Massively Distributed Peer-to-Peer Networks