This topic describes the scenarios that are used to test the performance of an ApsaraDB RDS for MySQL instance.

Table schema

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 with read/write operations

SQL type Ratio SQL statement
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 (?, ?, ?, ?)