Peer-to-peer (P2P) computing is gaining more and more significance due to its widespread use currently and potential deployments in future applications. In this paper, we propose CoCache, a P2P query processing architecture that enables sophisticated optimization techniques. In the scenario of CoCache, a large number of peers, each of which may be attached with a local relational database and a cache, are connected through an arbitrary P2P network. CoCache is different from existing P2P query processing systems in three ways. First, a coordinator overlay network (CON) maintaining the summary of the whole system is constructed by applying DHT technique to query plan trees. CON protocol ensures the efficiency for handling dynamic environments. Second, a preliminary cost-based optimization technique for retrieving appropriate cached copies of data is studied. With the help of CON, we show the possibility of fine optimization in even large scale and dynamic distributed environments. Last...