Sysbench 0.5
Sysbench allows you to select a test model appropriate to your service requirements. Table 1 lists the test models and scenarios supported by Sysbench 0.5.
Test Model |
Test Scenario |
Use Case |
|---|---|---|
OLTP DISTINCT |
OLTP read: deduplication query |
SELECT DISTINCT c FROM table_name WHERE id BETWEEN range_start AND range_start + (oltp_range_size - 1) ORDER BY c |
OLTP INDEX |
OLTP write: index column update |
UPDATE table_name SET k=k+1 WHERE id = sb_rand(1, oltp_table_size) |
OLTP NONINDEX |
OLTP write: update of columns without indexes |
UPDATE table_name SET c='c_val' WHERE id=sb_rand(1, oltp_table_size) |
OLTP ORDER |
OLTP read: sort query |
SELECT c FROM table_name WHERE id BETWEEN range_start AND range_start+(oltp_range_size - 1) ORDER BY c |
OLTP POINT |
OLTP read: point query |
SELECT c FROM table_name WHERE id=sb_rand(1, oltp_table_size) |
OLTP SIMPLE |
OLTP read: range query |
SELECT c FROM table_name WHERE id BETWEEN range_start AND range_start+(oltp_range_size - 1) |
OLTP SUM |
OLTP read: sum query |
SELECT SUM(K) FROM table_name HERE id BETWEEN range_start AND range_start + (oltp_range_size - 1) |
OLTP DELETE |
OLTP write: index column deletion and data insertion |
DELETE FROM table_name WHERE id=sb_rand(1, oltp_table_size)I INSERT INTO table_name (id, k, c, pad) VALUES string.format((%d, %d, '%s', '%s'),i, sb_rand(1, oltp_table_size) , c_val, pad_val) |
OLTP MIX |
OLTP mixed scenario: The preceding eight models are mixed. A transaction contains 17 SQL statements. By default, 10 OLTP POINT SQL statements are used, and one SQL statement for each of the other seven scenarios. |
The preceding scenarios are mixed. |