文档

测试场景

更新时间:

本文介绍云数据库RDS MySQL性能测试的场景信息。

表结构

CREATE TABLE `sbtest100` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `k` int(11) NOT NULL DEFAULT '0',
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k_100` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=25001 DEFAULT CHARSET=utf8

OLTP读写混合场景

SQL类型 比例 SQL语句
point_selects 10
SELECT c FROM sbtest100 WHERE id=?
simple_ranges 1
SELECT c FROM sbtest100  WHERE id BETWEEN ? AND ?
sum_ranges 1
SELECT SUM(k) FROM sbtest100  WHERE id BETWEEN ? AND ?
order_ranges 1
SELECT c FROM sbtest100  WHERE id BETWEEN ? AND ? ORDER BY c
distinct_ranges 1
SELECT DISTINCT c FROM sbtest100  WHERE id BETWEEN ? AND ? ORDER BY c
index_updates 1
UPDATE sbtest100  SET k=k+1 WHERE id=?
non_index_updates 1
UPDATE sbtest100  SET c=? WHERE id=?
deletes 1
DELETE FROM sbtest100  WHERE id=?
inserts_ignore 1
INSERT IGNORE INTO sbtest100  (id, k, c, pad) VALUES (?, ?, ?, ?)