Customized Hints for Read/Write Isolation
DDM allows you to customize a hint to specify whether SQL statements are executed on the primary instance or its read replicas.
The hint is in the format of /*mycat:db_type=host*/.
In the format, host can be "master" or "slave". "master" refers to the primary DB instance, and "slave" refers to read replicas.
Generally, after read/write isolation, write operations are performed only on the primary DB instance, and read operations are performed only on its read replicas. In some special scenarios where data needs to be read from the primary DB instance, you can customize a hint to forcibly perform read operations on the primary DB instance.
Last Article: LOAD DATA
Next Article: Setting a Hint to Skip the Cached Execution Plan
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.