Based on the unique properties and characteristics of the database in wireless sensor networks(WSNs) and the best database"in-network processing"mode
a query optimization algorithm is designed for WSNs based on asked communication mechanism by node.The simulation results through NS2 show that this scheme can reduce the transmission of a data packet and improve the effective contract rate
smaller the total energy consumption in the WSNs and extend the network’s life cycle.