TRUNCATE TABLE `accesspoints`;
ALTER TABLE `accesspoints` ADD INDEX `device_id` (`device_id`);
