|
|
table
|
CREATE DATABASE test;
|
|
CREATE TABLE t1 (
|
f text DEFAULT NULL,
|
UNIQUE KEY `f` (`f`) USING HASH
|
) ENGINE=InnoDB;
|
Run jmeter script UniqueHashTest.jmx
- adjust database configuration variables (see image).
- script creates a numeric counter, on each iteration launch 10 threads, that attempt to make the same insert concurrently with the counter value. Scrip finish after 200 seconds. Execute like:
jmeter -n -t UniqueHashTest.jmx -l UniqueHashTest.out
|
check inserted records.java
|
SELECT count(1) recordCount, count(distinct f) uniqueCount, count(1)- count(distinct f) duplicatedCount
|
FROM t1;
|
Should present something like that:
| recordCount |
uniqueCount |
duplicatedCount |
| 1622 |
1377 |
245 |
Reproducible on 10.4, 10.5.
|