question

HussainFakhruddin-7033 avatar image
0 Votes"
HussainFakhruddin-7033 asked AnuragSharma-MSFT commented

How can you create indexes on replica database only

I want to create a replica of Azure MariaDB but with the ability to create indexes on it to improve search performance.

How can I do that?

azure-database-mariadb
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HussainFakhruddin-7033, welcome to Microsoft Q&A forum.

Can you please confirm if you want to create indexes on read-replica of existing Azure MariaDB Database, or you want to create a new Azure MariaDB Server using existing replica and create indexes in it?

0 Votes 0 ·

HI @AnuragSharma-MSFT thanks for getting back.

I don't have a read replica right now. I'm planning to create a read-replica so that I can point my select queries to that database also I would like to have the ability to create index on the replica only to improve the performance of select without impacting inserts on the master server.

0 Votes 0 ·

1 Answer

AnuragSharma-MSFT avatar image
1 Vote"
AnuragSharma-MSFT answered AnuragSharma-MSFT commented

Hi @HussainFakhruddin-7033, thanks for providing more details.

Databases on Read replicas of Azure Database for MariaDB servers are created with read only option and they don't allow us to run any kind of ddl or insert/update/delete on them, even index creation is not allowed.

However, when we create the read replicas the indexes present on the primary server are synced with the read replicas. So if we want to create any new indexes, we first need to create them on the primary server which in turn will be synced to read-replicas.

Read replicas in Azure Database for MariaDB

Please let us know if this helps or else we can discuss further.




If answer is helpful please click on 191194-image.png as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions. Thank you for helping to improve Microsoft Q&A!



image.png (3.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HussainFakhruddin-7033, just wanted to check if you need any further discussion on this please let us know.

0 Votes 0 ·