PURPOSE: A data stream processing device and a method thereof are provided to distribute the load between a server and a terminal, and reduce network cost by executing a part of a query execution schedule in the terminal. CONSTITUTION: A decision unit(202) decides the first part executed in the terminal and the second part executed in a server in a query execution schedule. An offer unit(203) offers the first part to the terminal. A joint unit(204) unites a query execution result corresponding to the first part received from the terminal with the second part. A decision unit presumes the operation cost of the terminal and decides the first part. The operation cost is the cost necessary for executing a query operator of the query execution schedule.