Hi Silvio
The start of the mysqldump output file has table drop and then create sql commands. Below are the relevant
lines. Following that there are 10s of thousands of the INSERT INTO `event` lines which I assume are repopulating the event table.
It looks to me that the restore will do the table drop followed by a table create followed by repopulating the table with events. Would you agree?
Regards, John
----
-- MySQL dump 10.13 Distrib 5.5.53, for linux2.6 (x86_64)
--
-- Host: localhost Database: reporting
-- ------------------------------------------------------
-- Server version 5.5.53
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `event`
--
DROP TABLE IF EXISTS `event`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `event` (
`event_key` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`event_id` binary(26) NOT NULL,
`landscape_h` int(10) unsigned NOT NULL,
`model_key` int(10) unsigned NOT NULL DEFAULT '0',
`time` datetime NOT NULL,
`type` int(10) unsigned NOT NULL,
`creator_id` int(10) unsigned NOT NULL,
`event_msg` text,
`server_precedence` int(10) unsigned DEFAULT '0',
PRIMARY KEY (`event_key`,`time`),
UNIQUE KEY `event_id_model_key_idx` (`event_id`,`model_key`,`time`),
KEY `landscape_idx` (`landscape_h`),
KEY `model_key_idx` (`model_key`),
KEY `time_idx` (`time`),
KEY `landscape_and_time_idx` (`landscape_h`,`time`),
KEY `type_idx` (`type`),
KEY `creator_id_idx` (`creator_id`)
) ENGINE=InnoDB AUTO_INCREMENT=566579481 DEFAULT CHARSET=utf8 MAX_ROWS=1000000000 AVG_ROW_LENGTH=500
/*!50500 PARTITION BY RANGE COLUMNS(`time`)
(PARTITION EVENT_P18 VALUES LESS THAN ('2016-05-29 00:00:00') ENGINE = InnoDB,
PARTITION EVENT_P19 VALUES LESS THAN ('2016-06-05 00:00:00') ENGINE = InnoDB,
.
.
.
PARTITION EVENT_P75 VALUES LESS THAN ('2017-07-02 00:00:00') ENGINE = InnoDB,
PARTITION EVENT_P76 VALUES LESS THAN ('2017-07-09 00:00:00') ENGINE = InnoDB) */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `event`
--
LOCK TABLES `event` WRITE;
/*!40000 ALTER TABLE `event` DISABLE KEYS */;
INSERT INTO `event` ...