手动读写分离

  • 视图里有读有写,选择主库
  • 视图里只有读,选择从库

解决主从的一致性问题

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  • 设置装饰器手动选择数据库
posted @ 2019-08-25 10:39  太虚真人  阅读(187)  评论(0编辑  收藏  举报