insert into
history_minutely_${yearAndMonth}
values
(#{map.mac},#{map.time},#{map.json})
CREATE TABLE IF NOT EXISTS `history_minutely_${yearAndMonth}` (
`mac` varchar(30) CHARACTER SET latin1 DEFAULT NULL,
`time` datetime DEFAULT NULL,
`json` json DEFAULT NULL,
KEY `_idx_mac` (`mac`) USING BTREE,
KEY `_idx_time` (`time`) USING BTREE,
KEY `_idx_mac_time` (`mac`,`time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;