|
| 1 | +SET @@session.long_query_time = 1000; |
| 2 | +DROP TABLE IF EXISTS `temp_relations_SME_ADMIN_20181106`; |
| 3 | +CREATE TABLE `temp_relations_SME_ADMIN_20181106` ( |
| 4 | + `id` int(11) NOT NULL DEFAULT 0, |
| 5 | + `head` int(11) NOT NULL DEFAULT 0, |
| 6 | + `rel` varchar(15) NOT NULL DEFAULT 'V', |
| 7 | + `dep` int(11) NOT NULL DEFAULT 0, |
| 8 | + `freq` int(11) NOT NULL DEFAULT 0, |
| 9 | + `bfhead` BOOL NOT NULL, |
| 10 | + `bfdep` BOOL NOT NULL, |
| 11 | + `wfhead` BOOL NOT NULL, |
| 12 | + `wfdep` BOOL NOT NULL, |
| 13 | + PRIMARY KEY (`head`, `wfhead`, `dep`, `rel`), |
| 14 | + INDEX `dep-wfdep-head-rel-freq-id` (`dep`, `wfdep`, `head`, `rel`, `freq`, `id`), |
| 15 | + INDEX `head-dep-bfhead-bfdep-rel-freq-id` (`head`, `dep`, `bfhead`, `bfdep`, `rel`, `freq`, `id`), |
| 16 | + INDEX `dep-head-bfhead-bfdep-rel-freq-id` (`dep`, `head`, `bfhead`, `bfdep`, `rel`, `freq`, `id`)) default charset = utf8 row_format = compressed ; |
| 17 | +DROP TABLE IF EXISTS `temp_relations_SME_ADMIN_20181106_strings`; |
| 18 | +CREATE TABLE `temp_relations_SME_ADMIN_20181106_strings` ( |
| 19 | + `id` int(11) NOT NULL DEFAULT 0, |
| 20 | + `string` varchar(500) NOT NULL DEFAULT '', |
| 21 | + `stringextra` varchar(32) NOT NULL DEFAULT '', |
| 22 | + `pos` varchar(15) NOT NULL DEFAULT '', |
| 23 | + `lemma` varchar(500) NOT NULL DEFAULT '', |
| 24 | + PRIMARY KEY (`string`, `id`, `pos`, `stringextra`), |
| 25 | + INDEX `id-string-pos-stringextra` (`id`, `string`, `pos`, `stringextra`)) default charset = utf8 collate = utf8_bin row_format = compressed ; |
| 26 | +DROP TABLE IF EXISTS `temp_relations_SME_ADMIN_20181106_rel`; |
| 27 | +CREATE TABLE `temp_relations_SME_ADMIN_20181106_rel` ( |
| 28 | + `rel` varchar(15) NOT NULL DEFAULT 'V', |
| 29 | + `freq` int(11) NOT NULL DEFAULT 0, |
| 30 | + PRIMARY KEY (`rel`)) default charset = utf8 collate = utf8_bin row_format = compressed ; |
| 31 | +DROP TABLE IF EXISTS `temp_relations_SME_ADMIN_20181106_head_rel`; |
| 32 | +CREATE TABLE `temp_relations_SME_ADMIN_20181106_head_rel` ( |
| 33 | + `head` int(11) NOT NULL DEFAULT 0, |
| 34 | + `rel` varchar(15) NOT NULL DEFAULT 'V', |
| 35 | + `freq` int(11) NOT NULL DEFAULT 0, |
| 36 | + PRIMARY KEY (`head`, `rel`)) default charset = utf8 collate = utf8_bin row_format = compressed ; |
| 37 | +DROP TABLE IF EXISTS `temp_relations_SME_ADMIN_20181106_dep_rel`; |
| 38 | +CREATE TABLE `temp_relations_SME_ADMIN_20181106_dep_rel` ( |
| 39 | + `dep` int(11) NOT NULL DEFAULT 0, |
| 40 | + `rel` varchar(15) NOT NULL DEFAULT 'V', |
| 41 | + `freq` int(11) NOT NULL DEFAULT 0, |
| 42 | + PRIMARY KEY (`dep`, `rel`)) default charset = utf8 collate = utf8_bin row_format = compressed ; |
| 43 | +DROP TABLE IF EXISTS `temp_relations_SME_ADMIN_20181106_sentences`; |
| 44 | +CREATE TABLE `temp_relations_SME_ADMIN_20181106_sentences` ( |
| 45 | + `id` int(11) DEFAULT NULL, |
| 46 | + `sentence` varchar(64) NOT NULL DEFAULT '', |
| 47 | + `start` int(11) DEFAULT NULL, |
| 48 | + `end` int(11) DEFAULT NULL, |
| 49 | + INDEX `id` (`id`)) default charset = utf8 collate = utf8_bin row_format = compressed ; |
| 50 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106` DISABLE KEYS; |
| 51 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_strings` DISABLE KEYS; |
| 52 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_rel` DISABLE KEYS; |
| 53 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_head_rel` DISABLE KEYS; |
| 54 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_dep_rel` DISABLE KEYS; |
| 55 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_sentences` DISABLE KEYS; |
| 56 | +SET FOREIGN_KEY_CHECKS = 0; |
| 57 | +SET UNIQUE_CHECKS = 0; |
| 58 | +SET AUTOCOMMIT = 0; |
| 59 | +SET NAMES utf8; |
| 60 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106` ENABLE KEYS; |
| 61 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_strings` ENABLE KEYS; |
| 62 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_rel` ENABLE KEYS; |
| 63 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_head_rel` ENABLE KEYS; |
| 64 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_dep_rel` ENABLE KEYS; |
| 65 | +ALTER TABLE `temp_relations_SME_ADMIN_20181106_sentences` ENABLE KEYS; |
| 66 | +DROP TABLE IF EXISTS `relations_SME_ADMIN_20181106`, `relations_SME_ADMIN_20181106_strings`, `relations_SME_ADMIN_20181106_rel`, `relations_SME_ADMIN_20181106_head_rel`, `relations_SME_ADMIN_20181106_dep_rel`, `relations_SME_ADMIN_20181106_sentences`; |
| 67 | +RENAME TABLE `temp_relations_SME_ADMIN_20181106` TO `relations_SME_ADMIN_20181106`, `temp_relations_SME_ADMIN_20181106_strings` TO `relations_SME_ADMIN_20181106_strings`, `temp_relations_SME_ADMIN_20181106_rel` TO `relations_SME_ADMIN_20181106_rel`, `temp_relations_SME_ADMIN_20181106_head_rel` TO `relations_SME_ADMIN_20181106_head_rel`, `temp_relations_SME_ADMIN_20181106_dep_rel` TO `relations_SME_ADMIN_20181106_dep_rel`, `temp_relations_SME_ADMIN_20181106_sentences` TO `relations_SME_ADMIN_20181106_sentences`; |
| 68 | +SET UNIQUE_CHECKS = 1; |
| 69 | +SET FOREIGN_KEY_CHECKS = 1; |
| 70 | +COMMIT; |
0 commit comments