Hello.
i found host id
i found item id for each hosts
i tryed to move history for CPU2 Temp from test to test2
a part of history was transferred and other part was not
I use partitioning for mysql
Have I done something wrong?
Could you explain me how to move history correctly? How about trends?
Thanks
i found host id
Code:
mysql> select hostid, host from hosts; | 13032 | test | 13033 | test2
Code:
mysql> select itemid, name from items where hostid = 13032; +--------+--------------------+ | itemid | name | +--------+--------------------+ | 502778 | ICMP ping | | 502779 | ICMP loss | | 502780 | ICMP response time | | 502772 | System Temp | | 502773 | CPU1 Temp | | 502774 | CPU2 Temp | | 502775 | PCH Temp | | 502776 | Peripheral Temp | | 502777 | VBAT | +--------+--------------------+ 9 rows in set (0.00 sec)
Code:
mysql> select itemid, name from items where hostid = 13033; +--------+--------------------+ | itemid | name | +--------+--------------------+ | 502787 | ICMP ping | | 502788 | ICMP loss | | 502789 | ICMP response time | | 502781 | System Temp | | 502782 | CPU1 Temp | | 502783 | CPU2 Temp | | 502784 | PCH Temp | | 502785 | Peripheral Temp | | 502786 | VBAT | +--------+--------------------+ 9 rows in set (0.00 sec)
i tryed to move history for CPU2 Temp from test to test2
Code:
UPDATE history SET itemid = 502783 WHERE itemid = 502774;
Code:
mysql> UPDATE history SET itemid = 502783 WHERE itemid = 502774; Query OK, 377497 rows affected (12 min 54.16 sec) Rows matched: 377497 Changed: 377497 Warnings: 0
I use partitioning for mysql
Have I done something wrong?
Could you explain me how to move history correctly? How about trends?
Thanks
Comment