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` (`k`)); 在run阶段
simple模式 SELECT c FROM sbtest WHERE id=N Point queries SELECT c FROM sbtest WHERE id=N Range queries: SELECT c FROM sbtest WHERE id BETWEEN N AND M Range SUM() queries SELECT SUM(K) FROM sbtest WHERE id BETWEEN N and M Range ORDER BY queries SELECT c FROM sbtest WHERE id between N and M ORDER BY c Range DISTINCT queries SELECT DISTINCT c FROM sbtest WHERE id BETWEEN N and M ORDER BY c UPDATEs on index column UPDATE sbtest SET k=k+1 WHERE id=N UPDATEs on non-index column: UPDATE sbtest SET c=N WHERE id=M DELETE queries DELETE FROM sbtest WHERE id=N INSERT queries INSERT INTO sbtest VALUES (...) oltp test 模式通用参数 选项 描述 默认值 --oltp-table-name 表的名字 sbtest --oltp-table-size 表的行数 10000 --oltp-tables-count 表的个数 1 --oltp-dist-type 热点数据分布{uniform(均匀分布),Gaussian(高斯分布),special(空间分布)}。默认是special special --oltp-dist-pct special:热点数据产生的比例 1 --oltp-dist-res special:热点数据的访问频率 75 --oltp-test-mode simple,complex(以上介绍) complex --oltp-read-only 只有select 请求 off --oltp-skip-trx 不用事务 off --oltp-point-selects 一个事务中简单select查询数量 10 --oltp-simple-ranges 一个事务中简单range查询的数量 1 --oltp-sum-ranges sum range的数量 1 --oltp-order=ranges order range的数量 1 mysql test 参数 --mysql-host=[LIST,...] MySQL server host [localhost] --mysql-port=[LIST,...] MySQL server port [3306] --mysql-socket=[LIST,...] MySQL socket --mysql-user=STRING MySQL user [sbtest] --mysql-password=STRING MySQL password [] --mysql-db=STRING MySQL database name [sbtest] --mysql-table-engine=STRING storage engine to use for the test table {myisam,innodb,bdb,heap,ndbcluster,federated} [innodb] --mysql-engine-trx=STRING whether storage engine used is transactional or not {yes,no,auto} [auto] --mysql-ssl=[on|off] use SSL connections, if available in the client library [off] --mysql-ssl-cipher=STRING use specific cipher for SSL connections [] --mysql-compression=[on|off] use compression, if available in the client library [off] --myisam-max-rows=N max-rows parameter for MyISAM tables [1000000] --mysql-debug=[on|off] dump all client library calls [off] --mysql-ignore-errors=[LIST,...]list of errors to ignore, or "all" [1213,1020,1205] --mysql-dry-run=[on|off] Dry run, pretent that all MySQL client API calls are successful without executing them [off] 以上0.4版本的语法介绍完毕。