Simulate query in distributed database system.