In peer-to-peer (P2P) networks, nodes are quite different from each other in many aspects, such as sharing resources, online time and bandwidth. Some approaches have been introduced to take advantage of the query forwarding and answering heterogeneity such that the high bandwidth and query answering capability of nodes can be fully utilized to improve the system performance. In this paper, we suggest using the online time heterogeneity to improve the search efficiency of P2P networks. In our proposed Differentiated Index (Diff-Index) algorithm, the nodes with long online time will have higher priority to be queried. Because the online time is quite different among nodes, much search traffic can be saved by querying only a small portion of a network. The query success rate can be kept high because the nodes sharing a great amount of resources tend to have long online time. Our simulation results show that the Diff-Index algorithm can save 66 percent of search traffic.