So now i have the right output from mysql:
What causes this ?
select * from plugins
where version
= 2
…
| 61527 | ExamplePlugin | 0 | 2 | NULL |
| 61528 | ExamplePlugin | 0 | 2 | NULL |
| 61529 | ExamplePlugin | 0 | 2 | NULL |
| 61530 | ExamplePlugin | 0 | 2 | NULL |
| 61531 | ExamplePlugin | 0 | 2 | NULL |
| 61532 | ExamplePlugin | 0 | 2 | NULL |
| 61533 | ExamplePlugin | 0 | 2 | NULL |
±----------±--------------±--------------±--------±---------+
61532 rows in set (0.06 sec)
normal working librenms setup:
±----------±--------------±--------------±--------±---------+
| plugin_id | plugin_name | plugin_active | version | settings |
±----------±--------------±--------------±--------±---------+
| 2 | ExamplePlugin | 0 | 2 | NULL |
| 3 | ExamplePlugin | 0 | 2 | NULL |
| 4 | ExamplePlugin | 0 | 2 | NULL |
| 5 | ExamplePlugin | 0 | 2 | NULL |
| 6 | ExamplePlugin | 0 | 2 | NULL |
| 7 | ExamplePlugin | 0 | 2 | NULL |
| 8 | ExamplePlugin | 0 | 2 | NULL |
±----------±--------------±--------------±--------±---------+
7 rows in set (0.00 sec)
# Overall: 3.78M total, 261 unique, 17.43k QPS, 12.28x concurrency _______
# Time range: 2022-02-20T16:06:25 to 2022-02-20T16:10:02
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 2665s 1us 16s 704us 424us 15ms 73us
# Lock time 54s 0 732us 14us 63us 25us 0
# Rows sent 888.11M 0 60.09k 246.21 0.99 3.41k 0
# Rows examine 1.04G 0 6.51M 295.16 3.89 7.21k 0
# Query size 374.40M 0 3.24k 103.80 420.77 178.17 31.70
# Profile
# Rank Query ID Response time Calls R/Call
# ==== =================================== ============== ======= =======
# 1 0xD92B740F1A2D69E61CD9F671E8ABE9E7 964.0623 36.2% 10297 0.0936 0.04 SELECT plugins
# 2 0x7244B742AA6D6A2A366E56D912B16F72 693.6645 26.0% 10225 0.0678 0.02 SELECT devices device_group_device
# 3 0xDA556F9115773A1A99AA0165670CE848 131.6527 4.9% 1250482 0.0001 0.00 ADMIN PREPARE
# 4 0x9ABDE132E3CC17FA0B0F8492E949C611 106.5023 4.0% 143719 0.0007 0.05 SELECT devices
# 5 0x4B997CEBD3D59F77FEABB4D0F7217FDD 43.3852 1.6% 3 14.4617 0.12 SELECT syslog device_group_device
# 6 0xA51752125BBD75FEE1D7711E6D3C4EF4 37.7429 1.4% 39426 0.0010 0.03 UPDATE availability
# 7 0xED7CEEAD819780BBADF3A865395B56D1 37.4749 1.4% 42897 0.0009 0.03 UPDATE ports_statistics
# 8 0x68B076317C4F880832E4DED98D0BE837 34.3540 1.3% 39425 0.0009 0.03 SELECT device_outages
# 9 0x5C2079292E87D7ADE53B776A8C304704 28.3317 1.1% 10268 0.0028 0.00 SELECT alert_rules alert_device_map alert_group_map device_group_device alert_location_map devices device_group_device
# 10 0x1E266DA60BA820BEE9FFB34A20A71FC3 28.1788 1.1% 28913 0.0010 0.03 UPDATE ports
# 11 0x829B362756A0A2EA93CF1DB743EC602D 19.0201 0.7% 20530 0.0009 0.04 SELECT devices
# 12 0xF89A684790429543122A3BAEFCE85213 17.4469 0.7% 24147 0.0007 0.04 SELECT sensors
# 13 0xCB57AC2073153040484C7288D3A93CCB 16.1029 0.6% 9846 0.0016 0.05 UPDATE devices
# 14 0xD71F5560A7497EE4CB7C3A384B69D4FD 14.9542 0.6% 10154 0.0015 0.05 INSERT device_perf
# 15 0x36C6C2355E7489837F3995F06E68D0CB 14.4047 0.5% 13723 0.0010 0.02 UPDATE ports
# 16 0xBB92C3D80A89B029DCDCCFB674C52570 13.6355 0.5% 10267 0.0013 0.04 SELECT devices device_group_device device_groups
# 17 0xACACDAD3F6498FF910D65D41BF8D9DF3 13.4551 0.5% 9864 0.0014 0.01 SELECT ports ports_statistics
# 18 0xCD48070D5B790B29355C61277557CE69 13.2952 0.5% 11319 0.0012 0.05 SELECT locations
# 19 0x09F7BB7B79196439BB992AA585C981BA 12.4524 0.5% 9910 0.0013 0.03 UPDATE devices
# 20 0xA9BFB0C95C8DE5C667CC3A5C0258CEB2 12.3446 0.5% 10267 0.0012 0.03 SELECT devices device_group_device device_groups
# MISC 0xMISC 412.6714 15.5% 2076602 0.0002 0.0 <241 ITEMS>
# Query 1: 47.45 QPS, 4.44x concurrency, ID 0xD92B740F1A2D69E61CD9F671E8ABE9E7 at byte 230320754
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.04
# Time range: 2022-02-20T16:06:25 to 2022-02-20T16:10:02
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 10297
# Exec time 36 964s 36ms 629ms 94ms 230ms 64ms 65ms
# Lock time 0 290ms 11us 77us 28us 40us 8us 28us
# Rows sent 68 604.24M 60.09k 60.09k 60.09k 60.09k 0 60.09k
# Rows examine 56 604.25M 60.09k 60.09k 60.09k 60.09k 0 60.09k
# Query size 0 432.39k 43 43 43 43 0 43
# String:
# Databases customer
# Hosts 172.30.31.40 (2127/20%)... 6 more
# Users customer
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms ################################################################
# 100ms ##############################
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `customer` LIKE 'plugins'\G
# SHOW CREATE TABLE `customer`.`plugins`\G
# EXPLAIN /*!50100 PARTITIONS*/
select * from `plugins` where `version` = 2\G
# Query 2: 48.00 QPS, 3.26x concurrency, ID 0x7244B742AA6D6A2A366E56D912B16F72 at byte 795064534
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.02
# Time range: 2022-02-20T16:06:25 to 2022-02-20T16:09:58
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 10225
# Exec time 26 694s 27ms 309ms 68ms 155ms 39ms 51ms
# Lock time 0 408ms 15us 131us 39us 57us 11us 38us
# Rows sent 31 280.27M 28.07k 28.07k 28.07k 27.29k 0 27.29k
# Rows examine 38 414.50M 41.51k 41.51k 41.51k 40.32k 0 40.32k
# Query size 1 5.13M 526 526 526 526 0 526
# String:
# Databases customer
# Hosts 172.30.31.38 (2130/20%)... 6 more
# Users customer
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms ################################################################
# 100ms ################
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `customer` LIKE 'devices'\G
# SHOW CREATE TABLE `customer`.`devices`\G
# SHOW TABLE STATUS FROM `customer` LIKE 'device_group_device'\G
# SHOW CREATE TABLE `customer`.`device_group_device`\G
# EXPLAIN /*!50100 PARTITIONS*/
select `devices`.`device_id`, `device_group_device`.`device_group_id` as `pivot_device_group_id`, `device_group_device`.`device_id` as `pivot_device_id` from `devices` inner join `device_group_device` on `devices`.`device_id` = `device_group_device`.`device_id` where `device_group_device`.`device_group_id` in (1, 2, 3, 4, 7, 10, 11, 12, 15, 16, 17, 18, 20, 22, 23, 24, 25, 28, 29, 31, 43, 44, 45, 46, 47, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82)\G
# Query 3: 5.76k QPS, 0.61x concurrency, ID 0xDA556F9115773A1A99AA0165670CE848 at byte 1132111869
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2022-02-20T16:06:25 to 2022-02-20T16:10:02
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 33 1250482
# Exec time 4 132s 10us 4ms 105us 224us 68us 84us
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 9 35.78M 30 30 30 30 0 30
# String:
# Databases customer
# Hosts 172.30.31.38 (259175/20%)... 6 more
# Users customer
# Query_time distribution
# 1us
# 10us ################################################################
# 100us ##########################################
# 1ms #
# 10ms
# 100ms
# 1s
# 10s+
administrator command: Prepare\G