ckan / ideas

[DEPRECATED] Use the main CKAN repo Discussions instead:
https://github.com/ckan/ckan/discussions
40 stars 2 forks source link

Set Isolation Level to READ_UNCOMMITTED for read-only datastore connection #241

Open jqnatividad opened 4 years ago

jqnatividad commented 4 years ago

For large CKAN installations that use the Datastore and use postgresql replication, performance/concurrency has been vastly improved with the introduction of datastore.write_url and datastore.read_url set to the master and replica respectively.

Performance/concurrency can be further improved by allowing "dirty reads" of the datastore. This can be done by setting the SQLAlchemy engine isolation level to "READ_UNCOMMMITTED" for the read_url connection.

Installations that don't employ Postgres replication for the Datastore should also benefit from this change.