add basic cost estimation to query planning