开发者社区> 问答> 正文

性能白皮书-MySQL版-测试方法-测试模型



库表结构CREATE TABLE `sbtest` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8




数据格式id: 1
k: 3718516
c: 08566691963-88624912351-16662227201-46648573979-64646226163-77505759394-75470094713-41097360717-15161106334-50535565977
pad: 63188288836-92351140030-06390587585-66802097351-49282961843




SQL样式



查询:

  1. SELECT c FROM sbtest64 WHERE id=4957216
  2. SELECT c FROM sbtest43 WHERE id BETWEEN 4573346 AND 4573346+99
  3. SELECT SUM(K) FROM sbtest57 WHERE id BETWEEN 5034894 AND 5034894+99
  4. SELECT DISTINCT c FROM sbtest50 WHERE id BETWEEN 4959831 AND 4959831+99 ORDER BY c


写入:

  1. INSERT INTO sbtest3 (id, k, c, pad) VALUES (4974042, 4963580, '33958272865-80411528812-36334179010-84793024318-25708692091-43736213170-37853797624-40480626242-32131452190-24509204411', '07716658989-39745043214-17284860193-80004426880-14154945098')


更新:

  1. UPDATE sbtest11 SET k=k+1 WHERE id=5013989
  2. UPDATE sbtest14 SET c='10695174948-02130015518-68664370682-70336600207-55943744221-72419172189-36252607855-75106351226-86920614936-86254476316' WHERE id=5299388


删除:

  1. DELETE FROM sbtest33 WHERE id=5002332

展开
收起
梨好橙 2018-09-09 21:55:23 1644 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
One Box: 解读事务与分析一体化数据库 HybridDB for MySQL 立即下载
One Box:解读事务与分析一体化数据库HybridDB for MySQL 立即下载
如何支撑HTAP场景-HybridDB for MySQL系统架构和技术演进 立即下载

相关镜像