Ignore:
Timestamp:
May 31, 2017, 12:13:05 PM (4 years ago)
Author:
mabarracus
Message:

Sql optimizations
Better postinstallation script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics-0_1_3-to-0_1_4.sql

    r4854 r4990  
     1SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
    12SET AUTOCOMMIT = 0;
    23START TRANSACTION;
     
    67/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    78/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    8 /*!40101 SET NAMES utf8mb4 */;
     9/*!40101 SET NAMES utf8 */;
    910
    1011CREATE DATABASE IF NOT EXISTS `analytics` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
     
    3435  `version` char(20) NOT NULL,
    3536  `sabor` char(50) NOT NULL,
    36   PRIMARY KEY (`id`)
     37  PRIMARY KEY (`id`),
     38  KEY `fecha` (`fecha`),
     39  KEY `version_sabor` (`version`,`sabor`),
     40  KEY `app` (`app`),
     41  KEY `sabor` (`sabor`),
     42  KEY `version` (`version`),
     43  KEY `app_count` (`app`,`count`)
    3744) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
    3845
     
    4451  `nclients` int(11) NOT NULL,
    4552  PRIMARY KEY (`id`)
    46 ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
     53) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    4754
    4855CREATE TABLE IF NOT EXISTS `packages` (
     
    5360  `sabor` char(50) NOT NULL,
    5461  PRIMARY KEY (`id`),
    55   UNIQUE KEY `app` (`app`,`version`,`sabor`)
     62  KEY `app` (`app`),
     63  KEY `version_sabor` (`version`,`sabor`),
     64  KEY `sabor` (`sabor`),
     65  KEY `version` (`version`),
     66  KEY `app_count` (`app`,`count`),
     67  KEY `app_version_sabor` (`app`,`version`,`sabor`)
    5668) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
    5769COMMIT;
Note: See TracChangeset for help on using the changeset viewer.