mysql 关闭 innodb,我可以在MySQL / InnoDB中关闭事务吗?

I have a Django app where the default "REPEATABLE READ" transaction isolation level in InnoDB is causing different processes to have different views of the data than that current in the database.

e.g. Process 1 has made a change but Process 2 isn't seeing it.

I don't need transactional integrity in the app; can I just turn off transactions altogether so that all processes doing a SELECT see the same data?

Any downside to doing this?

Is this what is meant by "READ UNCOMMITTED"?

Any pointers welcome

Rachel

解决方案

I'd suggest that you just convert the InnoDB tables to myISAM. If your criteria is speed, you are wasting alot of potential by using a transaction oriented table type (InnoDB) and just disabling transactions. You would gain alot if you just converted the tables to myISAM. It's designed with lack of transactions in mind, while still being able to lock changes (i.e. table locks).

A clean

ALTER TABLE table_name ENGINE = MyISAM;

can do the trick for a single table, dumping, changing type and loading the table does the trick as well.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值