DZone

Do you want to make your schema and object creation faster in CockroachDB? I was working with a customer the other day that had a multi-region CockroachDB cluster spun up in US West 2, US East 1 and EU West 2 in AWS. Anytime they created an object, their DDL statements would take a few seconds because of all of the hops they must make to system tables for creating the objects. By default, the system tables are replicated uniformly across the cluster and the leaseholders/RAFT leaders (leaders for reads/writes) are dispersed in the cluster as well. In their case, creating all of their database objects took almost 30 minutes.

One way to optimize the creation of these database objects is to move all of the leaseholders for tables in the system database to a specific region. In the same region you move the leaseholder to, you should run the DDL statements

Source: DZone