optimizequerypartitions()