- 论坛徽章:
- 1
|
回复 2# cenalulu
我使用了msyqlslap,看不出什么结果来。我打开了general log,观察也没有观察出来什么,以下是详细的结果。天资愚笨,实在举不出好例子来验证上面的顺序问题,我个人认为,应该还是跟算法中的进程有关,要是这样说的话,就是随机来的了。根据进程间的争用情况,平等条件下,谁都可能是第一个先到的。我的例子没有举好,反映不出效果,看样子得高手出马了。
[root@localhost ~]# /usr/local/mysql55_20/bin/mysqlslap -uroot -S /data/mysqldata/3308/mysql.sock --create-schema=test --query="insert into t6 values(null,UNIX_TIMESTAMP(now()))" -v --concurrency=5 --iterations=2
Benchmark
Average number of seconds to run all queries: 0.137 seconds
Minimum number of seconds to run all queries: 0.093 seconds
Maximum number of seconds to run all queries: 0.164 seconds
Number of clients running queries: 5
Average number of queries per client: 1
general log日志情况:
120723 12:44:06 1681 Connect root@localhost on
1682 Connect root@localhost on test
1682 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1682 Quit
1683 Connect root@localhost on test
1683 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1683 Quit
1684 Connect root@localhost on test
1684 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1684 Quit
1685 Connect root@localhost on test
1685 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1685 Quit
1686 Connect root@localhost on test
1686 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1686 Quit
1687 Connect root@localhost on test
1687 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1687 Quit
1688 Connect root@localhost on test
1688 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
120723 12:44:07 1688 Quit
1689 Connect root@localhost on test
1689 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1689 Quit
1690 Connect root@localhost on test
1690 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1690 Quit
1691 Connect root@localhost on test
1691 Query insert into t6 values(null,UNIX_TIMESTAMP(now()))
1681 Quit
1691 Quit
下面select出来的记录:
| 301 | 1343061846 |
| 303 | 1343061846 |
| 305 | 1343061846 |
| 307 | 1343061846 |
| 309 | 1343061846 |
| 311 | 1343061846 |
| 313 | 1343061846 |
| 315 | 1343061847 |
| 317 | 1343061847 |
| 319 | 1343061847 |
+-----+------------+
160 rows in set (0.00 sec)
|
|