In the master/slave database replication, all writes go to the master machine. All reads go to the slave machine. The master machine replicates data to the slave. When the master replicates data to the slave, the slave machine has to do a write which would lock up the row. Reading from the slave machine is faster but why?
相关问题
- NOT DISTINCT query in mySQL
- Flush single app django 1.9
- keeping one connection to DB or opening closing pe
- Mysql-installer showing error : Memoy could not be
- Android Room Fetch data with dynamic table name
相关文章
- Connection pooling vs persist connection mysqli
- Speed up sqlFetch()
- How Do I Seed My Database in the setupBeforeClass
- I set a MySQL column to “NOT NULL” but still I can
- Where in Django can I run startup code that requir
- Google OAuth 2.0 User id datatype for MYSQL
- Restore deleted records in PostgreSQL
- SQLSTATE[HY000] [2002] Permission denied
The slave should be a lot faster, because:
This all means that the slave is under considerably less load than the master.
Actually, redirecting reads to the slave is a known performance modification.
The Master is very busy
SHOW PROCESSLIST;
with the usernamesystem user
). This can slightly slow things down the more Slaves are connected to the Master.Slaves are less busy because it ...
The only exceptions that would put the Slave and the Master on the same level playing field would be