Simulator for Query Optimisation