query and receive data in chunks