Specifying information needs declaratively has turned out to be useful in the context of databases systems, and reseachers have applied this approach to sensor networks. The first step to retrieve data from a sensor network in this way is the dissemination of the query. Energy-efficient query dissemination plays an important role for the lifetime of sensor networks. The topic of this paper is the optimization of probabilistic query dissemination: Based on easy-to-acquire topology information, the optimizer can predict the number of nodes reached and the energy consumption. Furthermore,
we propose a topology-discovery protocol that collects the structural information required by the optimizer. Our analysis shows that the energy savings exceed the energy spent to obtain the required information after a small number of queries disseminated in realistic settings. Our evaluation explores the tradeoff between reachability and energy consumption using both simulations and a deployment of Sun SPOT sensor nodes.