Planning phase slow compared to execution

The Convert To Rel phase is taking 3,359 ms, the cluster has 10 or more spaces with 3 to 4 VDS per space. Similar query on a different cluster with less number of spaces and VDS gets completed in 300ms.

How do we reduce time take by Convert to Rel phase?
In general what are the best practices to reduce the time taken in planning phase.

Try this and report back: https://docs.dremio.com/advanced-administration/metadata-cleanup.html

Just a hunch, I don’t work for dremio.

@desi
I tried the cleanup, but that did not reduce the planning time.

@balaji.ramaswamy Sorry to tag you directly. But is there some document where I can understand about convert to rel and what impacts the performance of convert to rel.

The planning time for the same query on different clusters are different. The Kuberenetes pod sizing is same. One cluster has more spaces and VDS.
The query only uses two VDS.

Basically planning is reading the db metadata. Look in your dremio conf on master node where it is storing the db folder - ensure that access to it is fast from the cluster which is running it slow.

If you have two clusters each with master node, then check they both have their own unique db folder end-point, not shared. If it is shared, one of the coordinators will automatically become a stand-by as the master will lock the db folder database.

Either way, the problem is in the environment. As a test you can do this test, stop the cluster that is running planning fast. Take the 2 config files dremio conf and env and copy them to slow planning running master node, start it and test it. Ensure you only do select type operations, no not create anything. Ensure no one is connecting to your cluster also.