|
| 1 | +––– block: ../base/start-searchd ––– |
| 2 | +––– input ––– |
| 3 | +manticore-load --quiet --json --port=9306 --init="CREATE TABLE task (id BIGINT, status UINT, enddatetime TIMESTAMP, isoverdue BOOL)" --load="INSERT INTO task (id, status, enddatetime, isoverdue) VALUES (<increment>, <int/1/8>, <int/1577836800/1672531200>, 0)" --batch-size=1000 --threads=4 --total=10000 |
| 4 | +––– output ––– |
| 5 | +{ |
| 6 | +"threads": %{NUMBER}, |
| 7 | +"batch_size": %{NUMBER}, |
| 8 | +"time": "%{NUMBER}:%{NUMBER}", |
| 9 | +"total_operations": %{NUMBER}, |
| 10 | +"operations_per_second": %{NUMBER}, |
| 11 | +"qps": { |
| 12 | +"avg": 0, |
| 13 | +"p99": 0, |
| 14 | +"p95": 0, |
| 15 | +"p5": 0, |
| 16 | +"p1": 0 |
| 17 | +}, |
| 18 | +"latency": { |
| 19 | +"avg": %{NUMBER}.%{NUMBER}, |
| 20 | +"p50": %{NUMBER}.%{NUMBER}, |
| 21 | +"p95": %{NUMBER}.%{NUMBER}, |
| 22 | +"p99": %{NUMBER}.%{NUMBER} |
| 23 | +} |
| 24 | +} |
| 25 | +––– input ––– |
| 26 | +mysql -P9306 -h0 -e "FLUSH RAMCHUNK task;" |
| 27 | +––– output ––– |
| 28 | +––– input ––– |
| 29 | +mysql -P9306 -h0 -e "OPTIMIZE TABLE task OPTION cutoff=1;" |
| 30 | +––– output ––– |
| 31 | +––– input ––– |
| 32 | +mysql -P9306 -h0 -e "SHOW TABLE task STATUS LIKE 'disk_chunks';" |
| 33 | +––– output ––– |
| 34 | ++---------------+-------+ |
| 35 | +| Variable_name | Value | |
| 36 | ++---------------+-------+ |
| 37 | +| disk_chunks | 1 | |
| 38 | ++---------------+-------+ |
| 39 | +––– input ––– |
| 40 | +mysql -P9306 -h0 -e "DESCRIBE task;" |
| 41 | +––– output ––– |
| 42 | ++-------------+-----------+------------+ |
| 43 | +| Field | Type | Properties | |
| 44 | ++-------------+-----------+------------+ |
| 45 | +| id | bigint | | |
| 46 | +| status | uint | | |
| 47 | +| enddatetime | timestamp | | |
| 48 | +| isoverdue | bool | | |
| 49 | ++-------------+-----------+------------+ |
| 50 | +––– input ––– |
| 51 | +mysql -P9306 -h0 -e "SET GLOBAL secondary_indexes=1; select id,status from task where isOverdue = 0 and status not in (1,4,5,6,7,8) ORDER BY id ASC LIMIT 10 /*+ SecondaryIndex(status) */; show meta;" |
| 52 | +––– output ––– |
| 53 | ++------+--------+ |
| 54 | +| id | status | |
| 55 | ++------+--------+ |
| 56 | +| 3 | 3 | |
| 57 | +| 6 | 3 | |
| 58 | +| 7 | 3 | |
| 59 | +| 12 | 2 | |
| 60 | +| 17 | 2 | |
| 61 | +| 20 | 3 | |
| 62 | +| 33 | 2 | |
| 63 | +| 36 | 2 | |
| 64 | +| 37 | 2 | |
| 65 | +| 38 | 2 | |
| 66 | ++------+--------+ |
| 67 | ++----------------+------------------------------+ |
| 68 | +| Variable_name | Value | |
| 69 | ++----------------+------------------------------+ |
| 70 | +| total | %{NUMBER} | |
| 71 | +| total_found | %{NUMBER} | |
| 72 | +| total_relation | eq | |
| 73 | +| time | %{NUMBER}.%{NUMBER} | |
| 74 | +| index | status:SecondaryIndex (100%) | |
| 75 | ++----------------+------------------------------+ |
| 76 | +––– input ––– |
| 77 | +mysql -P9306 -h0 -e "SET GLOBAL secondary_indexes=0; select id,status from task where isOverdue = 0 and status not in (1,4,5,6,7,8) ORDER BY id ASC LIMIT 10 /*+ SecondaryIndex(status) */; show meta;" |
| 78 | +––– output ––– |
| 79 | ++------+--------+ |
| 80 | +| id | status | |
| 81 | ++------+--------+ |
| 82 | +| 3 | 3 | |
| 83 | +| 6 | 3 | |
| 84 | +| 7 | 3 | |
| 85 | +| 12 | 2 | |
| 86 | +| 17 | 2 | |
| 87 | +| 20 | 3 | |
| 88 | +| 33 | 2 | |
| 89 | +| 36 | 2 | |
| 90 | +| 37 | 2 | |
| 91 | +| 38 | 2 | |
| 92 | ++------+--------+ |
| 93 | ++----------------+------------------------------------------------------------------------------------------------------------------------------+ |
| 94 | +| Variable_name | Value | |
| 95 | ++----------------+------------------------------------------------------------------------------------------------------------------------------+ |
| 96 | +| warning | table task: hint error: secondary indexes are disabled; hint error: requested hint type not supported for attribute 'status' | |
| 97 | +| total | %{NUMBER} | |
| 98 | +| total_found | %{NUMBER} | |
| 99 | +| total_relation | eq | |
| 100 | +| time | %{NUMBER}.%{NUMBER} | |
| 101 | ++----------------+------------------------------------------------------------------------------------------------------------------------------+ |
0 commit comments