RR 插入不影响
| test100 | CREATE TABLE `test100` (
`sn` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增编号',
`phoneNo` int(11) DEFAULT NULL,
`channelType` int(11) DEFAULT NULL COMMENT '通道识别',
`status` tinyint(4) NOT NULL COMMENT '短信转态,1.发送成功,2.发送失败,3.发送异常',
PRIMARY KEY (`sn`),
KEY `test100_idx1` (`phoneNo`)
) ENGINE=InnoDB AUTO_INCREMENT=5028 DEFAULT CHARSET=utf8 COMMENT='短信发送成功记录表' |
+--------- +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------+
1 row in set (0.02 sec) mysql> select * from test100 limit 20;
+----+---------+-------------+--------+
| sn | phoneNo | channelType | status |
+----+---------+-------------+--------+
| 1 | 1 | 2 | 1 |
| 2 | 2 | 2 | 1 |
| 3 | 3 | 2 | 1 |
| 4 | 4 | 2 | 1 |
| 5 | 5 | 2 | 1 |
| 6 | 6 | 2 | 1 |
| 7 | 7 | 2 | 1 |
| 8 | 8 | 2 | 1 |
| 9 | 9 | 2 | 1 |
| 10 | 10 | 2 | 1 |
| 11 | 11 | 2 | 1 |
| 16 | 16 | 2 | 1 |
| 17 | 17 | 2 | 1 |
| 18 | 18 | 2 | 1 |
| 19 | 19 | 2 | 1 |
| 20 | 20 | 2 | 1 |
| 21 | 21 | 2 | 1 |
| 22 | 22 | 2 | 1 |
| 23 | 23 | 2 | 1 |
| 24 | 24 | 2 | 1 |
+----+---------+-------------+--------+
20 rows in set (0.00 sec) Session 1: mysql> select * from test100 limit 20;
+----+---------+-------------+--------+
| sn | phoneNo | channelType | status |
+----+---------+-------------+--------+
| 1 | 1 | 2 | 1 |
| 2 | 2 | 2 | 1 |
| 3 | 3 | 2 | 1 |
| 4 | 4 | 2 | 1 |
| 5 | 5 | 2 | 1 |
| 6 | 6 | 2 | 1 |
| 7 | 7 | 2 | 1 |
| 8 | 8 | 2 | 1 |
| 9 | 9 | 2 | 1 |
| 10 | 10 | 2 | 1 |
| 11 | 11 | 2 | 1 |
| 16 | 16 | 2 | 1 |
| 17 | 17 | 2 | 1 |
| 18 | 18 | 2 | 1 |
| 19 | 19 | 2 | 1 |
| 20 | 20 | 2 | 1 |
| 21 | 21 | 2 | 1 |
| 22 | 22 | 2 | 1 |
| 23 | 23 | 2 | 1 |
| 24 | 24 | 2 | 1 |
+----+---------+-------------+--------+
20 rows in set (0.00 sec) mysql> SELECT @@tx_isolation;
+-----------------+
| @@tx_isolation |
+-----------------+
| REPEATABLE-READ |
+-----------------+
1 row in set (0.01 sec) mysql> start transaction;
Query OK, 0 rows affected (0.00 sec) mysql> insert into test100(phoneNo,channelType,status) values(15,1,1);
Query OK, 1 row affected (0.05 sec) Session 2:
mysql> use zjzc;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
mysql> insert into test100(phoneNo,channelType,status) values(15,1,1);
Query OK, 1 row affected (0.01 sec) mysql> insert into test100(phoneNo,channelType,status) values(14,1,1);
Query OK, 1 row affected (0.01 sec) mysql> insert into test100(phoneNo,channelType,status) values(16,1,1);
Query OK, 1 row affected (0.00 sec)
RR 插入不影响的更多相关文章
- SQL Server ->> SET ANSI_PADDING对于字符串插入的影响
前面写了<SQL Server ->> 字符串对比>讲了SQL Server在做字符串对比和排序时的对尾随空格的处理方法. 再说说有一个和字符串尾随空格相关联的东西就是SET ...
- 使用 MD5 加密 去重对插入的影响
现在有3000条数据,需要插入到数据库中去,使用的是对链接进行MD5加密, hashcode = md5(str(item_url))然后在数据库中设置 hashcode 为UNIQUE索引 3000 ...
- MYSQL开发性能研究——批量插入的优化措施
一.我们遇到了什么问题 在标准SQL里面,我们通常会写下如下的SQL insert语句. INSERT INTO TBL_TEST (id) VALUES(1); 很显然,在MYSQL中,这样的方 ...
- [Effective JavaScript 笔记] 第6条:了解分号插入的局限
分号可以省略 js可以在语句结束不强制加分号.(建议还是添加,不添加分号往往会出现不易发现的BUG) function Point(x,y){ this.x=x||0; this.y=y||0; } ...
- MySQL批量插入的分析以及注意事项
目录 1.背景 2.两种方式对比 2.1.一次插入一条数据 2.2.一次插入多条数据 3.拓展一下 4.Other 1.背景 我们在工作中基本都会碰到批量插入数据到DB的情况,这个时候我们就需要根据不 ...
- MyBatis插入记录时返回主键id的方法
有时候插入记录之后需要使用到插入记录的主键,通常是再查询一次来获取主键,但是MyBatis插入记录时可以设置成返回主键id,简化操作,方法大致有两种. 对应实体类: public class User ...
- Java 7之集合类型 - 二叉排序树、平衡树、红黑树---转
http://blog.csdn.net/mazhimazh/article/details/19961017 为了理解 TreeMap 的底层实现,必须先介绍排序二叉树和平衡二叉树,然后继续介绍红黑 ...
- DB2数据库中提高INSERT性能详解
分类: Linux INSERT 处理过程概述 首先让我们快速地看看插入一行时的处理步骤.这些步骤中的每一步都有优化的潜力,对此我们在后面会一一讨论. 在客户机准备 语句.对于动态 SQL,在 ...
- InnoDB锁机制
1. 锁类型 锁是数据库区别与文件系统的一个关键特性,锁机制用于管理对共享资源的并发访问. InnoDB使用的锁类型,分别有: 共享锁(S)和排他锁(X) 意向锁(IS和IX) 自增长锁(AUTO-I ...
随机推荐
- IO之流程与buffer 图
http://blog.chinaunix.net/uid-29075379-id-3944364.html
- Optimized Pagination using MySQL---reference
Dealing with large data sets makes it necessary to pick out only the newest or the hottest elements ...
- 省市联级菜单--js+html
<!DOCTYPE html> <html> <head> <title></title> </head> <body&g ...
- noip 2003 传染病控制(历史遗留问题2333)
/*codevs 1091 搜索 几个月之前写的70分 今天又写了一遍 并且找到了错误 */ #include<cstdio> #include<vector> #define ...
- 动态拼接 sql的时候 里面 如果有变量的话 按上面的方式进行处理
set @Sql_Sql = N' select top 1 @m_zw=zw,@m_zh=temp from ket where zd=''ddd'' ' print @Sql_Sql EXEC s ...
- SDK Manager.exe 无法启动,一闪而过的解决办法
删掉 C:\Windows\system32\ 下的 java.exe.javaw.exe.javaws.exe 即可解决.(转载)
- java 生成pdf报表
public void saveMapAddressInfo(String orderCode){ try{ List<Leads> leadses = leadsService.find ...
- org.springframework.beans.factory.BeanCreationException: 求教育!
2014-11-26 14:05:56 [org.springframework.web.context.support.XmlWebApplicationContext]-[WARN] Except ...
- iOS 8 Handoff 开发指南
(原文:Working with Handoff in iOS 8 作者:Gabriel Theodoropoulos 译者:半圆圆) 我想用下面这一个美妙的场景来开始这篇教程:假象一下你正在Mac上 ...
- Core Animation系列之CADisplayLink(转)
转自 http://www.tuicool.com/articles/meMVR3 一直以来都想好好学习下CoreAnimation,奈何涉及的东西太多,想要一次性全部搞定时间上不允许,以后会断断续续 ...