We have a pretty large sql azure database, over 300GB.
Many tables have been altered over time and we would like to create fresh indexes, including clustered ones. Of course we would like to minimize downtime as much as possible, even if it costs us.
The database is a DTU based, premium instance. We have upgraded/downgraded tiers multiple times and the experience is pretty seamless. As I understand it, Azure spins up a new instance in the background, copies the database, and then switches new connections to the new instance. No transactions are lost in the process and the connection break is very short, less than a minute.
This got me thinking of whether it would be possible to use a similar technique to rebuild indexes (and perform other potential maintenance tasks). Any idea on how we could achieve this? We are OK with paying for 2 instances during the transition.