Details
-
Type:
Improvement
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: Future Dev
-
Fix Version/s: None
-
Component/s: Database SQL/XMLDB, Performance
-
Labels:None
Description
There are a bunch of various AUX queries which don't need to be on the primary such as:
https://github.com/moodle/moodle/blob/master/lib/dml/pgsql_native_moodle_database.php#L354
https://github.com/moodle/moodle/blob/master/lib/dml/pgsql_native_moodle_database.php#L761
In fact almost all AUX should be safe to go to a read replica but I'm not sure we can assume that for 100% of AUX queries.
I'm proposing the simplest way might be to introduce a new type of query so we have both SQL_QUERY_AUX and SQL_QUERY_AUX_READONLY and then each driver can easily declare which is which.
Attachments
Issue Links
- has been marked as being related by
-
MDL-70998 Conditionally move recordsets / cursors to the db readonly replica where possible
-
- Closed
-