/* **********************************************************
 * Copyright 2011-2017 VMware, Inc.  All rights reserved. -- VMware Confidential
 * **********************************************************/

/*==============================================================*/
/* VCDB_PostgreSQL.sql                                          */
/* DBMS name:      PostgreSQL Version                           */
/* Created on:     7/18/2011 5:45:59 PM                         */
/*==============================================================*/

/* For most sequences, we will use an increment of 10. However, */
/* there are two exceptions:                                    */
/*                                                              */
/* + sequences used from within PL/SQL packages: we keep the    */
/*    increment at 1, and use the usual sequence access patterns*/
/*    since there is no overhead to it                          */
/*                                                              */
/*                                                              */
/* + "busy" sequences - we set the increment to 20 or even 100  */
/*                                                              */

/* Stat counter sequences - used from stored procedures */
/* Keep these all at an increment of 1 for now              */
CREATE SEQUENCE VPX_DEVICE_SEQ                   INCREMENT BY 1;
CREATE SEQUENCE VPX_SAMPLE_TIME1_SEQ             INCREMENT BY 30;
CREATE SEQUENCE VPX_SAMPLE_TIME2_SEQ             INCREMENT BY 1;
CREATE SEQUENCE VPX_SAMPLE_TIME3_SEQ             INCREMENT BY 1;
CREATE SEQUENCE VPX_SAMPLE_TIME4_SEQ             INCREMENT BY 1;
CREATE SEQUENCE VPX_STAT_COUNTER_SEQ             INCREMENT BY 1;
CREATE SEQUENCE VPX_USAGE_SAMPLE_TIME_SEQ        INCREMENT BY 30;

/* The rest of these sequences are used from C++ code, and should have    */
/* larger increments where appropriate, and be cached on the client side: */
CREATE SEQUENCE VPX_ENTITY_SEQ                   INCREMENT BY 20;
CREATE SEQUENCE VPX_SAMPLE_SEQ                   INCREMENT BY 100;
CREATE SEQUENCE VPX_TEMPLATE_SEQ                 INCREMENT BY 100;
CREATE SEQUENCE VPX_EVENT_SEQ                    INCREMENT BY 100;
CREATE SEQUENCE VPX_TASK_SEQ                     INCREMENT BY 20;
CREATE SEQUENCE VPX_ALARM_SEQ                    INCREMENT BY 100;
CREATE SEQUENCE VPX_SCHEDULEDTASK_SEQ            INCREMENT BY 100;
CREATE SEQUENCE VPX_FIELD_DEF_SEQ                INCREMENT BY 100;
CREATE SEQUENCE VPX_STAT_DEF_SEQ                 INCREMENT BY 100;
CREATE SEQUENCE VPX_STAT_ID_SEQ                  INCREMENT BY 100;
CREATE SEQUENCE VPX_ROLE_SEQ     START WITH 101  INCREMENT BY 100;
CREATE SEQUENCE VPX_ACCESS_SEQ                   INCREMENT BY 100;
CREATE SEQUENCE VPX_DRSRULES_SEQ                 INCREMENT BY 100;
CREATE SEQUENCE VPX_EXT_SERVER_SEQ               INCREMENT BY 100;
CREATE SEQUENCE VPX_EXT_SERVER_EMAIL_SEQ         INCREMENT BY 100;
CREATE SEQUENCE VPX_EXT_CLIENT_SEQ               INCREMENT BY 100;

/* New VC 4.0 sequences */
CREATE SEQUENCE VPX_IMAGE_LIB_SEQ                INCREMENT BY 100;
CREATE SEQUENCE VPX_COMPLIANCE_STATUS_SEQ        INCREMENT BY 100;
CREATE SEQUENCE VPX_PROFILE_SEQ                  INCREMENT BY 100;
CREATE SEQUENCE VPX_CHANGE_TAG_SEQ               INCREMENT BY 100;
CREATE SEQUENCE VPX_VDEVICE_BACKING_REL_SEQ      INCREMENT BY 100;
CREATE SEQUENCE VPX_TAG_SEQ                      INCREMENT BY 100;
CREATE SEQUENCE VPX_SN_VDEVICE_BACKING_REL_SEQ   INCREMENT BY 100;
CREATE SEQUENCE VPX_BINARY_DATA_SEQ              INCREMENT BY 1;
CREATE SEQUENCE VPX_IP_POOL_SEQ                  INCREMENT BY 100;
CREATE SEQUENCE VPX_ARRAY_SEQ                    INCREMENT BY 100;

/* New VC 5.0 sequences */
CREATE SEQUENCE VPX_ANSFILE_SEQ                  INCREMENT BY 100;

/* New VC 6.0 sequences */
CREATE SEQUENCE VPX_HOST_CNX_SEQ                 INCREMENT BY 1;

/* New VC vSphere.next sequence */
CREATE SEQUENCE VPX_HOST_SCSI_LUN_SEQ            INCREMENT BY 1;
CREATE SEQUENCE VPX_HOST_DISK_PART_SEQ           INCREMENT BY 1;

/* for callback service */
CREATE SEQUENCE VPX_CALLBACK_SERVICE_SEQ                 INCREMENT BY 1000;

/* InfraUpdateHa related sequences */
CREATE SEQUENCE VPX_INFRA_UPD_HA_PROVIDER_SEQ INCREMENT BY 50;
CREATE SEQUENCE VPX_INFRA_UPD_HA_HU_INFO_SEQ  INCREMENT BY 50;
CREATE SEQUENCE VPX_INFRA_UPD_HA_FILTER_SEQ   INCREMENT BY 50;

/* Compute policy related sequence */
CREATE SEQUENCE VPX_CP_POLICY_SEQ INCREMENT BY 10;

/*==============================================================*/
/* Table: VPX_OBJECT_TYPE                                       */
/*==============================================================*/
create table VPX_OBJECT_TYPE  (
   ID                   INTEGER                         not null,
   NAME                 VARCHAR(30)                    not null,
   constraint PK_VPX_OBJECT_TYPE primary key (ID)
);

--SET tablespace back to alarm if it exists
SELECT PREFTABLESPACE('alarm');

/*==============================================================*/
/* Table: VPX_ALARM                                             */
/*==============================================================*/
create table VPX_ALARM  (
   ALARM_ID             BIGINT                          not null,
   NAME                 VARCHAR(255),
   SYSTEM_NAME          VARCHAR(255),
   DESCRIPTION          VARCHAR(255),
   ENABLED              INTEGER,
   SETTING_DATA         TEXT,
   ENTITY_ID            BIGINT,
   ENTITY_TYPE          INTEGER,
   LASTMODIFIEDTIME     TIMESTAMP,
   LASTMODIFIEDUSER     VARCHAR(255),
   CREATION_EVENT_ID    INTEGER,
   ACTION_FREQUENCY     NUMERIC(10),
   TRIGGER_ONLY         INTEGER,
   ALARM_METADATA       VARCHAR(2000),
   constraint PK_VPX_ALARM primary key (ALARM_ID),
   constraint FK_VPX_ALARM_REF_ENTITY foreign key (ENTITY_TYPE)
      references VPX_OBJECT_TYPE (ID)
);

/*==============================================================*/
/* Table: VPX_ALARM_EXPRESSION                                  */
/*==============================================================*/
create table VPX_ALARM_EXPRESSION (
   ALARM_ID             BIGINT                          not null,
   EXPRESSION_ID        INTEGER                         not null,
   PARENT_ID            INTEGER,
   EXPRESSION_TYPE      VARCHAR(255),
   OBJECT_TYPE          VARCHAR(255),
   OBJECT_PATH          VARCHAR(1000),
   OPERATOR             VARCHAR(255),
   RED                  VARCHAR(255),
   YELLOW               VARCHAR(255),
   NEW_STATUS           VARCHAR(10),
   RED_INTERVAL         NUMERIC(5),
   YELLOW_INTERVAL      NUMERIC(5),
   constraint PK_VPX_ALARM_EXP primary key (ALARM_ID, EXPRESSION_ID),
   constraint FK_VPX_ALARM_EXP_REF_ALARM foreign key(ALARM_ID)
      references VPX_ALARM (ALARM_ID)
);

/*==============================================================*/
/* Table: VPX_ALARM_EXPR_COMP                                   */
/*==============================================================*/
create table VPX_ALARM_EXPR_COMP (
   ALARM_ID             BIGINT                   not null,
   EXPRESSION_ID        INTEGER                  not null,
   ATTRIBUTE_NAME       VARCHAR(255)         not null,
   OPERATOR_TYPE        VARCHAR(20)          default 'equals' not null,
   ATTRIBUTE_VALUE      VARCHAR(255)         null,
   SURR_KEY				SERIAL,
   constraint PK_VPX_ALARM_EXPR_COMP primary key (ALARM_ID, EXPRESSION_ID,SURR_KEY),
   constraint FK_VPX_ALARM_EXPR_COMP_REF foreign key(ALARM_ID,EXPRESSION_ID)
      references VPX_ALARM_EXPRESSION (ALARM_ID, EXPRESSION_ID) on delete cascade
);

/*==============================================================*/
/* Table: VPX_ALARM_ACTION                                      */
/*==============================================================*/
create table VPX_ALARM_ACTION (
   ALARM_ID             BIGINT                          not null,
   ACTION_ID            INTEGER                         not null,
   PARENT_ID            INTEGER,
   ALARM_ACTION_TYPE    VARCHAR(255),
   GREEN2YELLOW         INTEGER,
   RED2YELLOW           INTEGER,
   YELLOW2GREEN         INTEGER,
   YELLOW2RED           INTEGER,
   ACTION_TYPE          VARCHAR(255),
   ACTION_DATA          TEXT,
   GREEN2YELLOW_REPEAT_FLG      NUMERIC(1) DEFAULT 0 NOT NULL,
   RED2YELLOW_REPEAT_FLG        NUMERIC(1) DEFAULT 0 NOT NULL,
   YELLOW2GREEN_REPEAT_FLG      NUMERIC(1) DEFAULT 0 NOT NULL,
   YELLOW2RED_REPEAT_FLG        NUMERIC(1) DEFAULT 0 NOT NULL,
   constraint PK_VPX_ALARM_ACTION primary key (ALARM_ID, ACTION_ID),
   constraint FK_VPX_ALARM_ACT_REF_ALARM foreign key(ALARM_ID)
      references VPX_ALARM (ALARM_ID)
);


/*==============================================================*/
/* Table: VPX_ALARM_RUNTIME                                     */
/*==============================================================*/
create table VPX_ALARM_RUNTIME (
   ENTITY_ID            BIGINT                          not null,
   ALARM_ID             BIGINT                          not null,
   ENTITY_TYPE          INTEGER,
   EXPRESSION_NAME      VARCHAR(440)                   not null,
   STATE_VALUE          VARCHAR(255),
   METRIC_VALUE         INTEGER,
   CREATED_TIME         TIMESTAMP,
   STATUS_VALUE         VARCHAR(50),
   EVENT_KEY            INTEGER                         null,
   constraint PK_VPX_ALARM_RUNTIME primary key (ENTITY_ID, ALARM_ID,
         EXPRESSION_NAME)
);

/*==============================================================*/
/* Index: IX_VPX_ALRT_CRTIME_STATUSVALUE                        */
/*==============================================================*/
CREATE INDEX IX_VPX_ALRT_CRTIME_STATUSVALUE ON VPX_ALARM_RUNTIME (CREATED_TIME, STATUS_VALUE);

/*==============================================================*/
/* Table: VPX_ALARM_STATE                                       */
/*==============================================================*/
create table VPX_ALARM_STATE (
   ENTITY_ID            BIGINT                       not null,
   ALARM_ID             BIGINT                       not null,
   ALARM_OVERRIDEN      NUMERIC(1) DEFAULT 0          not null,
   OVERRIDE_USER        VARCHAR(255),
   OVERRIDE_TIME        TIMESTAMP,
   ALARM_ACKNOWLEDGED   NUMERIC(1) DEFAULT 0          not null,
   ACK_USER             VARCHAR(255),
   ACK_TIME             TIMESTAMP,
   REPEAT_TRIGGER       NUMERIC(1) DEFAULT 0          not null,
   constraint PK_VPX_ALARM_STATE primary key (ENTITY_ID, ALARM_ID)
);

/*==============================================================*/
/* Table: VPX_ALARM_REPEAT_ACTION                               */
/*==============================================================*/
create table VPX_ALARM_REPEAT_ACTION (
   ENTITY_ID            BIGINT                       not null,
   ALARM_ID             BIGINT                       not null,
   ENTITY_TYPE          INTEGER                      not null,
   NEW_STATUS		VARCHAR(50),
   OLD_STATUS		VARCHAR(50),
   TRIG_SUMMARY         TEXT,
   DECL_SUMMARY         TEXT,
   EVENT_DESC           TEXT,
   EVENT_ID             INTEGER,
   constraint PK_VPX_ALARM_RPTACT primary key (ENTITY_ID, ALARM_ID)
);

--Reset tablespace back to default
RESET default_tablespace;

/*==============================================================*/
/* Table: VPX_CUSTOMIZATION_SPEC                                */
/*==============================================================*/
create table VPX_CUSTOMIZATION_SPEC  (
   NAME                 VARCHAR(255)                 not null,
   TYPE                 VARCHAR(255)                 not null,
   DESCRIPTION          TEXT,
   BODY                 TEXT,
   CHANGE_VERSION       VARCHAR(255)                 not null,
   LAST_UPDATE_TIME     INTEGER                       not null,
   constraint PK_VPX_CUSTOMIZATION_SPEC primary key (NAME)
);

/*==============================================================*/
/* Table: VPX_CHANGE_TAG                                        */
/*==============================================================*/
create table VPX_CHANGE_TAG  (
   CHANGE_TAG_ID               INTEGER                           not null,
   CHANGE_TAG_VAL              VARCHAR(255)                    not null,
   constraint PK_VPX_CHANGE_TAG primary key (CHANGE_TAG_ID)
);

/*==============================================================*/
/* Index: VPX_CHANGE_TAG_M1                                     */
/*==============================================================*/
create index VPX_CHANGE_TAG_M1 on VPX_CHANGE_TAG (
   CHANGE_TAG_VAL
);

--SET tablespace back to vcseat
SELECT PREFTABLESPACE('event');

/*==============================================================*/
/*  VPX_EVENT partition                                         */
/*==============================================================*/
/*==============================================================*/
/* Table: VPX_EVENT_1                                           */
/*==============================================================*/
create table VPX_EVENT_1  (
   EVENT_ID             INTEGER                        not null,
   CHAIN_ID             INTEGER,
   EVENT_TYPE           VARCHAR(255),
   EXTENDED_CLASS       NUMERIC(1) ,
   CREATE_TIME          TIMESTAMP,
   USERNAME             VARCHAR(255),
   CATEGORY             VARCHAR(255),
   VM_ID                BIGINT,
   VM_NAME              VARCHAR(255),
   HOST_ID              BIGINT,
   HOST_NAME            VARCHAR(255),
   COMPUTERESOURCE_ID   BIGINT,
   COMPUTERESOURCE_TYPE INTEGER,
   COMPUTERESOURCE_NAME VARCHAR(255),
   DATACENTER_ID        BIGINT,
   DATACENTER_NAME      VARCHAR(255),
   DATASTORE_ID         BIGINT,
   DATASTORE_NAME       VARCHAR(255),
   NETWORK_ID           BIGINT,
   NETWORK_NAME         VARCHAR(255),
   NETWORK_TYPE         CHAR(1),
   DVS_ID               BIGINT,
   DVS_NAME             VARCHAR(255),
   STORAGEPOD_ID        BIGINT,
   STORAGEPOD_NAME      VARCHAR(255),
   CHANGE_TAG_ID        INTEGER,
   constraint PK_VPX_EVENT_1 primary key (EVENT_ID)
);


CREATE TABLE VPX_EVENT_2 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_3 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_4 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_5 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_6 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_7 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_8 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_9 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_10 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_11 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_12 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_13 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_14 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_15 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_16 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_17 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_18 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_19 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_20 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_21 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_22 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_23 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_24 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_25 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_26 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_27 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_28 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_29 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_30 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_31 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_32 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_33 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_34 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_35 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_36 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_37 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_38 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_39 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_40 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_41 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_42 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_43 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_44 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_45 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_46 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_47 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_48 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_49 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_50 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_51 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_52 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_53 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_54 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_55 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_56 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_57 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_58 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_59 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_60 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_61 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_62 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_63 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_64 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_65 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_66 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_67 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_68 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_69 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_70 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_71 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_72 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_73 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_74 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_75 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_76 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_77 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_78 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_79 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_80 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_81 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_82 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_83 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_84 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_85 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_86 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_87 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_88 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_89 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_90 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_91 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_92 (LIKE VPX_EVENT_1 INCLUDING DEFAULTS);

/*==============================================================*/
/* Primary Keys of VPX_EVENT_x                                 */
/*==============================================================*/
ALTER TABLE VPX_EVENT_2 ADD CONSTRAINT PK_VPX_EVENT_2 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_3 ADD CONSTRAINT PK_VPX_EVENT_3 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_4 ADD CONSTRAINT PK_VPX_EVENT_4 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_5 ADD CONSTRAINT PK_VPX_EVENT_5 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_6 ADD CONSTRAINT PK_VPX_EVENT_6 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_7 ADD CONSTRAINT PK_VPX_EVENT_7 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_8 ADD CONSTRAINT PK_VPX_EVENT_8 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_9 ADD CONSTRAINT PK_VPX_EVENT_9 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_10 ADD CONSTRAINT PK_VPX_EVENT_10 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_11 ADD CONSTRAINT PK_VPX_EVENT_11 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_12 ADD CONSTRAINT PK_VPX_EVENT_12 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_13 ADD CONSTRAINT PK_VPX_EVENT_13 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_14 ADD CONSTRAINT PK_VPX_EVENT_14 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_15 ADD CONSTRAINT PK_VPX_EVENT_15 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_16 ADD CONSTRAINT PK_VPX_EVENT_16 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_17 ADD CONSTRAINT PK_VPX_EVENT_17 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_18 ADD CONSTRAINT PK_VPX_EVENT_18 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_19 ADD CONSTRAINT PK_VPX_EVENT_19 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_20 ADD CONSTRAINT PK_VPX_EVENT_20 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_21 ADD CONSTRAINT PK_VPX_EVENT_21 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_22 ADD CONSTRAINT PK_VPX_EVENT_22 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_23 ADD CONSTRAINT PK_VPX_EVENT_23 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_24 ADD CONSTRAINT PK_VPX_EVENT_24 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_25 ADD CONSTRAINT PK_VPX_EVENT_25 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_26 ADD CONSTRAINT PK_VPX_EVENT_26 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_27 ADD CONSTRAINT PK_VPX_EVENT_27 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_28 ADD CONSTRAINT PK_VPX_EVENT_28 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_29 ADD CONSTRAINT PK_VPX_EVENT_29 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_30 ADD CONSTRAINT PK_VPX_EVENT_30 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_31 ADD CONSTRAINT PK_VPX_EVENT_31 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_32 ADD CONSTRAINT PK_VPX_EVENT_32 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_33 ADD CONSTRAINT PK_VPX_EVENT_33 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_34 ADD CONSTRAINT PK_VPX_EVENT_34 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_35 ADD CONSTRAINT PK_VPX_EVENT_35 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_36 ADD CONSTRAINT PK_VPX_EVENT_36 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_37 ADD CONSTRAINT PK_VPX_EVENT_37 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_38 ADD CONSTRAINT PK_VPX_EVENT_38 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_39 ADD CONSTRAINT PK_VPX_EVENT_39 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_40 ADD CONSTRAINT PK_VPX_EVENT_40 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_41 ADD CONSTRAINT PK_VPX_EVENT_41 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_42 ADD CONSTRAINT PK_VPX_EVENT_42 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_43 ADD CONSTRAINT PK_VPX_EVENT_43 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_44 ADD CONSTRAINT PK_VPX_EVENT_44 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_45 ADD CONSTRAINT PK_VPX_EVENT_45 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_46 ADD CONSTRAINT PK_VPX_EVENT_46 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_47 ADD CONSTRAINT PK_VPX_EVENT_47 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_48 ADD CONSTRAINT PK_VPX_EVENT_48 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_49 ADD CONSTRAINT PK_VPX_EVENT_49 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_50 ADD CONSTRAINT PK_VPX_EVENT_50 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_51 ADD CONSTRAINT PK_VPX_EVENT_51 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_52 ADD CONSTRAINT PK_VPX_EVENT_52 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_53 ADD CONSTRAINT PK_VPX_EVENT_53 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_54 ADD CONSTRAINT PK_VPX_EVENT_54 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_55 ADD CONSTRAINT PK_VPX_EVENT_55 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_56 ADD CONSTRAINT PK_VPX_EVENT_56 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_57 ADD CONSTRAINT PK_VPX_EVENT_57 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_58 ADD CONSTRAINT PK_VPX_EVENT_58 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_59 ADD CONSTRAINT PK_VPX_EVENT_59 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_60 ADD CONSTRAINT PK_VPX_EVENT_60 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_61 ADD CONSTRAINT PK_VPX_EVENT_61 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_62 ADD CONSTRAINT PK_VPX_EVENT_62 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_63 ADD CONSTRAINT PK_VPX_EVENT_63 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_64 ADD CONSTRAINT PK_VPX_EVENT_64 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_65 ADD CONSTRAINT PK_VPX_EVENT_65 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_66 ADD CONSTRAINT PK_VPX_EVENT_66 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_67 ADD CONSTRAINT PK_VPX_EVENT_67 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_68 ADD CONSTRAINT PK_VPX_EVENT_68 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_69 ADD CONSTRAINT PK_VPX_EVENT_69 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_70 ADD CONSTRAINT PK_VPX_EVENT_70 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_71 ADD CONSTRAINT PK_VPX_EVENT_71 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_72 ADD CONSTRAINT PK_VPX_EVENT_72 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_73 ADD CONSTRAINT PK_VPX_EVENT_73 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_74 ADD CONSTRAINT PK_VPX_EVENT_74 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_75 ADD CONSTRAINT PK_VPX_EVENT_75 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_76 ADD CONSTRAINT PK_VPX_EVENT_76 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_77 ADD CONSTRAINT PK_VPX_EVENT_77 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_78 ADD CONSTRAINT PK_VPX_EVENT_78 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_79 ADD CONSTRAINT PK_VPX_EVENT_79 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_80 ADD CONSTRAINT PK_VPX_EVENT_80 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_81 ADD CONSTRAINT PK_VPX_EVENT_81 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_82 ADD CONSTRAINT PK_VPX_EVENT_82 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_83 ADD CONSTRAINT PK_VPX_EVENT_83 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_84 ADD CONSTRAINT PK_VPX_EVENT_84 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_85 ADD CONSTRAINT PK_VPX_EVENT_85 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_86 ADD CONSTRAINT PK_VPX_EVENT_86 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_87 ADD CONSTRAINT PK_VPX_EVENT_87 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_88 ADD CONSTRAINT PK_VPX_EVENT_88 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_89 ADD CONSTRAINT PK_VPX_EVENT_89 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_90 ADD CONSTRAINT PK_VPX_EVENT_90 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_91 ADD CONSTRAINT PK_VPX_EVENT_91 PRIMARY KEY (EVENT_ID);
ALTER TABLE VPX_EVENT_92 ADD CONSTRAINT PK_VPX_EVENT_92 PRIMARY KEY (EVENT_ID);


/*==============================================================*/
/* Index VPXI_EVENT_DVS_ID_x                                    */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_DVS_ID_1 on VPX_EVENT_1 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_2 on VPX_EVENT_2 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_3 on VPX_EVENT_3 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_4 on VPX_EVENT_4 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_5 on VPX_EVENT_5 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_6 on VPX_EVENT_6 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_7 on VPX_EVENT_7 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_8 on VPX_EVENT_8 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_9 on VPX_EVENT_9 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_10 on VPX_EVENT_10 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_11 on VPX_EVENT_11 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_12 on VPX_EVENT_12 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_13 on VPX_EVENT_13 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_14 on VPX_EVENT_14 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_15 on VPX_EVENT_15 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_16 on VPX_EVENT_16 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_17 on VPX_EVENT_17 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_18 on VPX_EVENT_18 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_19 on VPX_EVENT_19 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_20 on VPX_EVENT_20 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_21 on VPX_EVENT_21 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_22 on VPX_EVENT_22 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_23 on VPX_EVENT_23 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_24 on VPX_EVENT_24 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_25 on VPX_EVENT_25 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_26 on VPX_EVENT_26 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_27 on VPX_EVENT_27 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_28 on VPX_EVENT_28 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_29 on VPX_EVENT_29 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_30 on VPX_EVENT_30 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_31 on VPX_EVENT_31 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_32 on VPX_EVENT_32 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_33 on VPX_EVENT_33 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_34 on VPX_EVENT_34 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_35 on VPX_EVENT_35 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_36 on VPX_EVENT_36 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_37 on VPX_EVENT_37 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_38 on VPX_EVENT_38 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_39 on VPX_EVENT_39 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_40 on VPX_EVENT_40 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_41 on VPX_EVENT_41 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_42 on VPX_EVENT_42 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_43 on VPX_EVENT_43 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_44 on VPX_EVENT_44 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_45 on VPX_EVENT_45 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_46 on VPX_EVENT_46 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_47 on VPX_EVENT_47 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_48 on VPX_EVENT_48 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_49 on VPX_EVENT_49 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_50 on VPX_EVENT_50 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_51 on VPX_EVENT_51 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_52 on VPX_EVENT_52 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_53 on VPX_EVENT_53 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_54 on VPX_EVENT_54 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_55 on VPX_EVENT_55 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_56 on VPX_EVENT_56 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_57 on VPX_EVENT_57 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_58 on VPX_EVENT_58 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_59 on VPX_EVENT_59 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_60 on VPX_EVENT_60 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_61 on VPX_EVENT_61 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_62 on VPX_EVENT_62 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_63 on VPX_EVENT_63 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_64 on VPX_EVENT_64 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_65 on VPX_EVENT_65 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_66 on VPX_EVENT_66 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_67 on VPX_EVENT_67 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_68 on VPX_EVENT_68 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_69 on VPX_EVENT_69 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_70 on VPX_EVENT_70 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_71 on VPX_EVENT_71 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_72 on VPX_EVENT_72 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_73 on VPX_EVENT_73 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_74 on VPX_EVENT_74 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_75 on VPX_EVENT_75 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_76 on VPX_EVENT_76 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_77 on VPX_EVENT_77 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_78 on VPX_EVENT_78 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_79 on VPX_EVENT_79 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_80 on VPX_EVENT_80 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_81 on VPX_EVENT_81 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_82 on VPX_EVENT_82 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_83 on VPX_EVENT_83 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_84 on VPX_EVENT_84 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_85 on VPX_EVENT_85 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_86 on VPX_EVENT_86 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_87 on VPX_EVENT_87 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_88 on VPX_EVENT_88 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_89 on VPX_EVENT_89 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_90 on VPX_EVENT_90 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_91 on VPX_EVENT_91 (DVS_ID)  WHERE DVS_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DVS_ID_92 on VPX_EVENT_92 (DVS_ID)  WHERE DVS_ID IS NOT NULL;


/*==============================================================*/
/* Index VPXI_EVENT_CATEGORY_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_CATEGORY_1 on VPX_EVENT_1 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_2 on VPX_EVENT_2 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_3 on VPX_EVENT_3 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_4 on VPX_EVENT_4 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_5 on VPX_EVENT_5 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_6 on VPX_EVENT_6 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_7 on VPX_EVENT_7 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_8 on VPX_EVENT_8 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_9 on VPX_EVENT_9 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_10 on VPX_EVENT_10 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_11 on VPX_EVENT_11 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_12 on VPX_EVENT_12 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_13 on VPX_EVENT_13 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_14 on VPX_EVENT_14 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_15 on VPX_EVENT_15 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_16 on VPX_EVENT_16 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_17 on VPX_EVENT_17 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_18 on VPX_EVENT_18 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_19 on VPX_EVENT_19 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_20 on VPX_EVENT_20 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_21 on VPX_EVENT_21 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_22 on VPX_EVENT_22 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_23 on VPX_EVENT_23 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_24 on VPX_EVENT_24 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_25 on VPX_EVENT_25 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_26 on VPX_EVENT_26 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_27 on VPX_EVENT_27 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_28 on VPX_EVENT_28 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_29 on VPX_EVENT_29 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_30 on VPX_EVENT_30 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_31 on VPX_EVENT_31 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_32 on VPX_EVENT_32 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_33 on VPX_EVENT_33 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_34 on VPX_EVENT_34 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_35 on VPX_EVENT_35 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_36 on VPX_EVENT_36 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_37 on VPX_EVENT_37 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_38 on VPX_EVENT_38 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_39 on VPX_EVENT_39 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_40 on VPX_EVENT_40 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_41 on VPX_EVENT_41 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_42 on VPX_EVENT_42 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_43 on VPX_EVENT_43 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_44 on VPX_EVENT_44 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_45 on VPX_EVENT_45 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_46 on VPX_EVENT_46 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_47 on VPX_EVENT_47 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_48 on VPX_EVENT_48 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_49 on VPX_EVENT_49 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_50 on VPX_EVENT_50 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_51 on VPX_EVENT_51 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_52 on VPX_EVENT_52 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_53 on VPX_EVENT_53 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_54 on VPX_EVENT_54 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_55 on VPX_EVENT_55 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_56 on VPX_EVENT_56 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_57 on VPX_EVENT_57 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_58 on VPX_EVENT_58 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_59 on VPX_EVENT_59 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_60 on VPX_EVENT_60 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_61 on VPX_EVENT_61 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_62 on VPX_EVENT_62 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_63 on VPX_EVENT_63 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_64 on VPX_EVENT_64 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_65 on VPX_EVENT_65 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_66 on VPX_EVENT_66 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_67 on VPX_EVENT_67 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_68 on VPX_EVENT_68 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_69 on VPX_EVENT_69 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_70 on VPX_EVENT_70 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_71 on VPX_EVENT_71 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_72 on VPX_EVENT_72 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_73 on VPX_EVENT_73 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_74 on VPX_EVENT_74 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_75 on VPX_EVENT_75 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_76 on VPX_EVENT_76 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_77 on VPX_EVENT_77 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_78 on VPX_EVENT_78 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_79 on VPX_EVENT_79 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_80 on VPX_EVENT_80 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_81 on VPX_EVENT_81 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_82 on VPX_EVENT_82 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_83 on VPX_EVENT_83 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_84 on VPX_EVENT_84 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_85 on VPX_EVENT_85 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_86 on VPX_EVENT_86 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_87 on VPX_EVENT_87 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_88 on VPX_EVENT_88 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_89 on VPX_EVENT_89 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_90 on VPX_EVENT_90 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_91 on VPX_EVENT_91 (CATEGORY);
CREATE INDEX VPXI_EVENT_CATEGORY_92 on VPX_EVENT_92 (CATEGORY);

/*==============================================================*/
/* Index VPXI_EVENT_CHAIN_ID_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_CHAIN_ID_1 on VPX_EVENT_1 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_2 on VPX_EVENT_2 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_3 on VPX_EVENT_3 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_4 on VPX_EVENT_4 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_5 on VPX_EVENT_5 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_6 on VPX_EVENT_6 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_7 on VPX_EVENT_7 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_8 on VPX_EVENT_8 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_9 on VPX_EVENT_9 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_10 on VPX_EVENT_10 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_11 on VPX_EVENT_11 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_12 on VPX_EVENT_12 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_13 on VPX_EVENT_13 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_14 on VPX_EVENT_14 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_15 on VPX_EVENT_15 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_16 on VPX_EVENT_16 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_17 on VPX_EVENT_17 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_18 on VPX_EVENT_18 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_19 on VPX_EVENT_19 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_20 on VPX_EVENT_20 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_21 on VPX_EVENT_21 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_22 on VPX_EVENT_22 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_23 on VPX_EVENT_23 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_24 on VPX_EVENT_24 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_25 on VPX_EVENT_25 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_26 on VPX_EVENT_26 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_27 on VPX_EVENT_27 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_28 on VPX_EVENT_28 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_29 on VPX_EVENT_29 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_30 on VPX_EVENT_30 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_31 on VPX_EVENT_31 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_32 on VPX_EVENT_32 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_33 on VPX_EVENT_33 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_34 on VPX_EVENT_34 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_35 on VPX_EVENT_35 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_36 on VPX_EVENT_36 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_37 on VPX_EVENT_37 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_38 on VPX_EVENT_38 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_39 on VPX_EVENT_39 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_40 on VPX_EVENT_40 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_41 on VPX_EVENT_41 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_42 on VPX_EVENT_42 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_43 on VPX_EVENT_43 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_44 on VPX_EVENT_44 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_45 on VPX_EVENT_45 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_46 on VPX_EVENT_46 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_47 on VPX_EVENT_47 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_48 on VPX_EVENT_48 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_49 on VPX_EVENT_49 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_50 on VPX_EVENT_50 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_51 on VPX_EVENT_51 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_52 on VPX_EVENT_52 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_53 on VPX_EVENT_53 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_54 on VPX_EVENT_54 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_55 on VPX_EVENT_55 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_56 on VPX_EVENT_56 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_57 on VPX_EVENT_57 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_58 on VPX_EVENT_58 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_59 on VPX_EVENT_59 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_60 on VPX_EVENT_60 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_61 on VPX_EVENT_61 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_62 on VPX_EVENT_62 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_63 on VPX_EVENT_63 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_64 on VPX_EVENT_64 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_65 on VPX_EVENT_65 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_66 on VPX_EVENT_66 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_67 on VPX_EVENT_67 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_68 on VPX_EVENT_68 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_69 on VPX_EVENT_69 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_70 on VPX_EVENT_70 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_71 on VPX_EVENT_71 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_72 on VPX_EVENT_72 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_73 on VPX_EVENT_73 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_74 on VPX_EVENT_74 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_75 on VPX_EVENT_75 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_76 on VPX_EVENT_76 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_77 on VPX_EVENT_77 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_78 on VPX_EVENT_78 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_79 on VPX_EVENT_79 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_80 on VPX_EVENT_80 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_81 on VPX_EVENT_81 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_82 on VPX_EVENT_82 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_83 on VPX_EVENT_83 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_84 on VPX_EVENT_84 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_85 on VPX_EVENT_85 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_86 on VPX_EVENT_86 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_87 on VPX_EVENT_87 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_88 on VPX_EVENT_88 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_89 on VPX_EVENT_89 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_90 on VPX_EVENT_90 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_91 on VPX_EVENT_91 (CHAIN_ID);
CREATE INDEX VPXI_EVENT_CHAIN_ID_92 on VPX_EVENT_92 (CHAIN_ID);


/*==============================================================*/
/* Index VPXI_EVENT_COMPUTERES_ID_x                             */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_1 on VPX_EVENT_1 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_2 on VPX_EVENT_2 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_3 on VPX_EVENT_3 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_4 on VPX_EVENT_4 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_5 on VPX_EVENT_5 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_6 on VPX_EVENT_6 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_7 on VPX_EVENT_7 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_8 on VPX_EVENT_8 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_9 on VPX_EVENT_9 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_10 on VPX_EVENT_10 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_11 on VPX_EVENT_11 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_12 on VPX_EVENT_12 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_13 on VPX_EVENT_13 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_14 on VPX_EVENT_14 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_15 on VPX_EVENT_15 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_16 on VPX_EVENT_16 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_17 on VPX_EVENT_17 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_18 on VPX_EVENT_18 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_19 on VPX_EVENT_19 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_20 on VPX_EVENT_20 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_21 on VPX_EVENT_21 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_22 on VPX_EVENT_22 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_23 on VPX_EVENT_23 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_24 on VPX_EVENT_24 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_25 on VPX_EVENT_25 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_26 on VPX_EVENT_26 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_27 on VPX_EVENT_27 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_28 on VPX_EVENT_28 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_29 on VPX_EVENT_29 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_30 on VPX_EVENT_30 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_31 on VPX_EVENT_31 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_32 on VPX_EVENT_32 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_33 on VPX_EVENT_33 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_34 on VPX_EVENT_34 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_35 on VPX_EVENT_35 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_36 on VPX_EVENT_36 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_37 on VPX_EVENT_37 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_38 on VPX_EVENT_38 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_39 on VPX_EVENT_39 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_40 on VPX_EVENT_40 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_41 on VPX_EVENT_41 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_42 on VPX_EVENT_42 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_43 on VPX_EVENT_43 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_44 on VPX_EVENT_44 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_45 on VPX_EVENT_45 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_46 on VPX_EVENT_46 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_47 on VPX_EVENT_47 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_48 on VPX_EVENT_48 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_49 on VPX_EVENT_49 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_50 on VPX_EVENT_50 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_51 on VPX_EVENT_51 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_52 on VPX_EVENT_52 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_53 on VPX_EVENT_53 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_54 on VPX_EVENT_54 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_55 on VPX_EVENT_55 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_56 on VPX_EVENT_56 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_57 on VPX_EVENT_57 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_58 on VPX_EVENT_58 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_59 on VPX_EVENT_59 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_60 on VPX_EVENT_60 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_61 on VPX_EVENT_61 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_62 on VPX_EVENT_62 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_63 on VPX_EVENT_63 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_64 on VPX_EVENT_64 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_65 on VPX_EVENT_65 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_66 on VPX_EVENT_66 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_67 on VPX_EVENT_67 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_68 on VPX_EVENT_68 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_69 on VPX_EVENT_69 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_70 on VPX_EVENT_70 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_71 on VPX_EVENT_71 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_72 on VPX_EVENT_72 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_73 on VPX_EVENT_73 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_74 on VPX_EVENT_74 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_75 on VPX_EVENT_75 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_76 on VPX_EVENT_76 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_77 on VPX_EVENT_77 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_78 on VPX_EVENT_78 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_79 on VPX_EVENT_79 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_80 on VPX_EVENT_80 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_81 on VPX_EVENT_81 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_82 on VPX_EVENT_82 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_83 on VPX_EVENT_83 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_84 on VPX_EVENT_84 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_85 on VPX_EVENT_85 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_86 on VPX_EVENT_86 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_87 on VPX_EVENT_87 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_88 on VPX_EVENT_88 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_89 on VPX_EVENT_89 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_90 on VPX_EVENT_90 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_91 on VPX_EVENT_91 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_COMPUTERES_ID_92 on VPX_EVENT_92 (COMPUTERESOURCE_ID) WHERE COMPUTERESOURCE_ID IS NOT NULL;


/*==============================================================*/
/* Index VPXI_EVENT_CREATE_TIME_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_CREATE_TIME_1 on VPX_EVENT_1 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_2 on VPX_EVENT_2 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_3 on VPX_EVENT_3 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_4 on VPX_EVENT_4 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_5 on VPX_EVENT_5 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_6 on VPX_EVENT_6 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_7 on VPX_EVENT_7 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_8 on VPX_EVENT_8 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_9 on VPX_EVENT_9 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_10 on VPX_EVENT_10 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_11 on VPX_EVENT_11 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_12 on VPX_EVENT_12 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_13 on VPX_EVENT_13 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_14 on VPX_EVENT_14 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_15 on VPX_EVENT_15 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_16 on VPX_EVENT_16 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_17 on VPX_EVENT_17 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_18 on VPX_EVENT_18 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_19 on VPX_EVENT_19 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_20 on VPX_EVENT_20 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_21 on VPX_EVENT_21 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_22 on VPX_EVENT_22 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_23 on VPX_EVENT_23 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_24 on VPX_EVENT_24 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_25 on VPX_EVENT_25 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_26 on VPX_EVENT_26 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_27 on VPX_EVENT_27 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_28 on VPX_EVENT_28 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_29 on VPX_EVENT_29 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_30 on VPX_EVENT_30 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_31 on VPX_EVENT_31 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_32 on VPX_EVENT_32 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_33 on VPX_EVENT_33 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_34 on VPX_EVENT_34 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_35 on VPX_EVENT_35 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_36 on VPX_EVENT_36 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_37 on VPX_EVENT_37 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_38 on VPX_EVENT_38 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_39 on VPX_EVENT_39 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_40 on VPX_EVENT_40 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_41 on VPX_EVENT_41 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_42 on VPX_EVENT_42 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_43 on VPX_EVENT_43 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_44 on VPX_EVENT_44 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_45 on VPX_EVENT_45 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_46 on VPX_EVENT_46 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_47 on VPX_EVENT_47 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_48 on VPX_EVENT_48 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_49 on VPX_EVENT_49 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_50 on VPX_EVENT_50 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_51 on VPX_EVENT_51 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_52 on VPX_EVENT_52 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_53 on VPX_EVENT_53 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_54 on VPX_EVENT_54 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_55 on VPX_EVENT_55 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_56 on VPX_EVENT_56 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_57 on VPX_EVENT_57 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_58 on VPX_EVENT_58 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_59 on VPX_EVENT_59 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_60 on VPX_EVENT_60 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_61 on VPX_EVENT_61 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_62 on VPX_EVENT_62 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_63 on VPX_EVENT_63 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_64 on VPX_EVENT_64 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_65 on VPX_EVENT_65 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_66 on VPX_EVENT_66 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_67 on VPX_EVENT_67 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_68 on VPX_EVENT_68 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_69 on VPX_EVENT_69 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_70 on VPX_EVENT_70 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_71 on VPX_EVENT_71 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_72 on VPX_EVENT_72 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_73 on VPX_EVENT_73 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_74 on VPX_EVENT_74 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_75 on VPX_EVENT_75 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_76 on VPX_EVENT_76 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_77 on VPX_EVENT_77 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_78 on VPX_EVENT_78 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_79 on VPX_EVENT_79 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_80 on VPX_EVENT_80 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_81 on VPX_EVENT_81 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_82 on VPX_EVENT_82 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_83 on VPX_EVENT_83 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_84 on VPX_EVENT_84 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_85 on VPX_EVENT_85 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_86 on VPX_EVENT_86 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_87 on VPX_EVENT_87 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_88 on VPX_EVENT_88 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_89 on VPX_EVENT_89 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_90 on VPX_EVENT_90 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_91 on VPX_EVENT_91 (CREATE_TIME);
CREATE INDEX VPXI_EVENT_CREATE_TIME_92 on VPX_EVENT_92 (CREATE_TIME);

/*==============================================================*/
/* Index VPXI_EVENT_DATACENTER_ID_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_DATACENTER_ID_1 on VPX_EVENT_1 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_2 on VPX_EVENT_2 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_3 on VPX_EVENT_3 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_4 on VPX_EVENT_4 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_5 on VPX_EVENT_5 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_6 on VPX_EVENT_6 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_7 on VPX_EVENT_7 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_8 on VPX_EVENT_8 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_9 on VPX_EVENT_9 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_10 on VPX_EVENT_10 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_11 on VPX_EVENT_11 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_12 on VPX_EVENT_12 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_13 on VPX_EVENT_13 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_14 on VPX_EVENT_14 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_15 on VPX_EVENT_15 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_16 on VPX_EVENT_16 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_17 on VPX_EVENT_17 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_18 on VPX_EVENT_18 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_19 on VPX_EVENT_19 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_20 on VPX_EVENT_20 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_21 on VPX_EVENT_21 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_22 on VPX_EVENT_22 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_23 on VPX_EVENT_23 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_24 on VPX_EVENT_24 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_25 on VPX_EVENT_25 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_26 on VPX_EVENT_26 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_27 on VPX_EVENT_27 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_28 on VPX_EVENT_28 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_29 on VPX_EVENT_29 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_30 on VPX_EVENT_30 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_31 on VPX_EVENT_31 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_32 on VPX_EVENT_32 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_33 on VPX_EVENT_33 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_34 on VPX_EVENT_34 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_35 on VPX_EVENT_35 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_36 on VPX_EVENT_36 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_37 on VPX_EVENT_37 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_38 on VPX_EVENT_38 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_39 on VPX_EVENT_39 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_40 on VPX_EVENT_40 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_41 on VPX_EVENT_41 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_42 on VPX_EVENT_42 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_43 on VPX_EVENT_43 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_44 on VPX_EVENT_44 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_45 on VPX_EVENT_45 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_46 on VPX_EVENT_46 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_47 on VPX_EVENT_47 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_48 on VPX_EVENT_48 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_49 on VPX_EVENT_49 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_50 on VPX_EVENT_50 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_51 on VPX_EVENT_51 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_52 on VPX_EVENT_52 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_53 on VPX_EVENT_53 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_54 on VPX_EVENT_54 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_55 on VPX_EVENT_55 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_56 on VPX_EVENT_56 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_57 on VPX_EVENT_57 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_58 on VPX_EVENT_58 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_59 on VPX_EVENT_59 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_60 on VPX_EVENT_60 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_61 on VPX_EVENT_61 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_62 on VPX_EVENT_62 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_63 on VPX_EVENT_63 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_64 on VPX_EVENT_64 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_65 on VPX_EVENT_65 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_66 on VPX_EVENT_66 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_67 on VPX_EVENT_67 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_68 on VPX_EVENT_68 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_69 on VPX_EVENT_69 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_70 on VPX_EVENT_70 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_71 on VPX_EVENT_71 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_72 on VPX_EVENT_72 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_73 on VPX_EVENT_73 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_74 on VPX_EVENT_74 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_75 on VPX_EVENT_75 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_76 on VPX_EVENT_76 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_77 on VPX_EVENT_77 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_78 on VPX_EVENT_78 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_79 on VPX_EVENT_79 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_80 on VPX_EVENT_80 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_81 on VPX_EVENT_81 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_82 on VPX_EVENT_82 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_83 on VPX_EVENT_83 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_84 on VPX_EVENT_84 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_85 on VPX_EVENT_85 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_86 on VPX_EVENT_86 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_87 on VPX_EVENT_87 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_88 on VPX_EVENT_88 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_89 on VPX_EVENT_89 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_90 on VPX_EVENT_90 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_91 on VPX_EVENT_91 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATACENTER_ID_92 on VPX_EVENT_92 (DATACENTER_ID) WHERE DATACENTER_ID IS NOT NULL;

/*==============================================================*/
/* Index VPXI_EVENT_DATASTORE_ID_x                              */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_DATASTORE_ID_1 on VPX_EVENT_1 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_2 on VPX_EVENT_2 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_3 on VPX_EVENT_3 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_4 on VPX_EVENT_4 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_5 on VPX_EVENT_5 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_6 on VPX_EVENT_6 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_7 on VPX_EVENT_7 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_8 on VPX_EVENT_8 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_9 on VPX_EVENT_9 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_10 on VPX_EVENT_10 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_11 on VPX_EVENT_11 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_12 on VPX_EVENT_12 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_13 on VPX_EVENT_13 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_14 on VPX_EVENT_14 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_15 on VPX_EVENT_15 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_16 on VPX_EVENT_16 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_17 on VPX_EVENT_17 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_18 on VPX_EVENT_18 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_19 on VPX_EVENT_19 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_20 on VPX_EVENT_20 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_21 on VPX_EVENT_21 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_22 on VPX_EVENT_22 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_23 on VPX_EVENT_23 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_24 on VPX_EVENT_24 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_25 on VPX_EVENT_25 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_26 on VPX_EVENT_26 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_27 on VPX_EVENT_27 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_28 on VPX_EVENT_28 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_29 on VPX_EVENT_29 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_30 on VPX_EVENT_30 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_31 on VPX_EVENT_31 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_32 on VPX_EVENT_32 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_33 on VPX_EVENT_33 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_34 on VPX_EVENT_34 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_35 on VPX_EVENT_35 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_36 on VPX_EVENT_36 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_37 on VPX_EVENT_37 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_38 on VPX_EVENT_38 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_39 on VPX_EVENT_39 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_40 on VPX_EVENT_40 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_41 on VPX_EVENT_41 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_42 on VPX_EVENT_42 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_43 on VPX_EVENT_43 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_44 on VPX_EVENT_44 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_45 on VPX_EVENT_45 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_46 on VPX_EVENT_46 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_47 on VPX_EVENT_47 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_48 on VPX_EVENT_48 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_49 on VPX_EVENT_49 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_50 on VPX_EVENT_50 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_51 on VPX_EVENT_51 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_52 on VPX_EVENT_52 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_53 on VPX_EVENT_53 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_54 on VPX_EVENT_54 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_55 on VPX_EVENT_55 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_56 on VPX_EVENT_56 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_57 on VPX_EVENT_57 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_58 on VPX_EVENT_58 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_59 on VPX_EVENT_59 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_60 on VPX_EVENT_60 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_61 on VPX_EVENT_61 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_62 on VPX_EVENT_62 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_63 on VPX_EVENT_63 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_64 on VPX_EVENT_64 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_65 on VPX_EVENT_65 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_66 on VPX_EVENT_66 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_67 on VPX_EVENT_67 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_68 on VPX_EVENT_68 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_69 on VPX_EVENT_69 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_70 on VPX_EVENT_70 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_71 on VPX_EVENT_71 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_72 on VPX_EVENT_72 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_73 on VPX_EVENT_73 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_74 on VPX_EVENT_74 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_75 on VPX_EVENT_75 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_76 on VPX_EVENT_76 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_77 on VPX_EVENT_77 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_78 on VPX_EVENT_78 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_79 on VPX_EVENT_79 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_80 on VPX_EVENT_80 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_81 on VPX_EVENT_81 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_82 on VPX_EVENT_82 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_83 on VPX_EVENT_83 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_84 on VPX_EVENT_84 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_85 on VPX_EVENT_85 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_86 on VPX_EVENT_86 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_87 on VPX_EVENT_87 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_88 on VPX_EVENT_88 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_89 on VPX_EVENT_89 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_90 on VPX_EVENT_90 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_91 on VPX_EVENT_91 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_DATASTORE_ID_92 on VPX_EVENT_92 (DATASTORE_ID) WHERE DATASTORE_ID IS NOT NULL;


/*==============================================================*/
/* Index VPXI_EVENT_EVENT_TYPE_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_EVENT_TYPE_1 on VPX_EVENT_1 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_2 on VPX_EVENT_2 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_3 on VPX_EVENT_3 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_4 on VPX_EVENT_4 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_5 on VPX_EVENT_5 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_6 on VPX_EVENT_6 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_7 on VPX_EVENT_7 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_8 on VPX_EVENT_8 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_9 on VPX_EVENT_9 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_10 on VPX_EVENT_10 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_11 on VPX_EVENT_11 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_12 on VPX_EVENT_12 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_13 on VPX_EVENT_13 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_14 on VPX_EVENT_14 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_15 on VPX_EVENT_15 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_16 on VPX_EVENT_16 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_17 on VPX_EVENT_17 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_18 on VPX_EVENT_18 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_19 on VPX_EVENT_19 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_20 on VPX_EVENT_20 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_21 on VPX_EVENT_21 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_22 on VPX_EVENT_22 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_23 on VPX_EVENT_23 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_24 on VPX_EVENT_24 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_25 on VPX_EVENT_25 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_26 on VPX_EVENT_26 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_27 on VPX_EVENT_27 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_28 on VPX_EVENT_28 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_29 on VPX_EVENT_29 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_30 on VPX_EVENT_30 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_31 on VPX_EVENT_31 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_32 on VPX_EVENT_32 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_33 on VPX_EVENT_33 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_34 on VPX_EVENT_34 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_35 on VPX_EVENT_35 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_36 on VPX_EVENT_36 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_37 on VPX_EVENT_37 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_38 on VPX_EVENT_38 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_39 on VPX_EVENT_39 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_40 on VPX_EVENT_40 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_41 on VPX_EVENT_41 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_42 on VPX_EVENT_42 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_43 on VPX_EVENT_43 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_44 on VPX_EVENT_44 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_45 on VPX_EVENT_45 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_46 on VPX_EVENT_46 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_47 on VPX_EVENT_47 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_48 on VPX_EVENT_48 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_49 on VPX_EVENT_49 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_50 on VPX_EVENT_50 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_51 on VPX_EVENT_51 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_52 on VPX_EVENT_52 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_53 on VPX_EVENT_53 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_54 on VPX_EVENT_54 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_55 on VPX_EVENT_55 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_56 on VPX_EVENT_56 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_57 on VPX_EVENT_57 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_58 on VPX_EVENT_58 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_59 on VPX_EVENT_59 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_60 on VPX_EVENT_60 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_61 on VPX_EVENT_61 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_62 on VPX_EVENT_62 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_63 on VPX_EVENT_63 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_64 on VPX_EVENT_64 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_65 on VPX_EVENT_65 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_66 on VPX_EVENT_66 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_67 on VPX_EVENT_67 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_68 on VPX_EVENT_68 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_69 on VPX_EVENT_69 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_70 on VPX_EVENT_70 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_71 on VPX_EVENT_71 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_72 on VPX_EVENT_72 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_73 on VPX_EVENT_73 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_74 on VPX_EVENT_74 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_75 on VPX_EVENT_75 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_76 on VPX_EVENT_76 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_77 on VPX_EVENT_77 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_78 on VPX_EVENT_78 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_79 on VPX_EVENT_79 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_80 on VPX_EVENT_80 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_81 on VPX_EVENT_81 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_82 on VPX_EVENT_82 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_83 on VPX_EVENT_83 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_84 on VPX_EVENT_84 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_85 on VPX_EVENT_85 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_86 on VPX_EVENT_86 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_87 on VPX_EVENT_87 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_88 on VPX_EVENT_88 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_89 on VPX_EVENT_89 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_90 on VPX_EVENT_90 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_91 on VPX_EVENT_91 (EVENT_TYPE);
CREATE INDEX VPXI_EVENT_EVENT_TYPE_92 on VPX_EVENT_92 (EVENT_TYPE);

/*==============================================================*/
/* Index VPXI_EVENT_EXTENDED_CLASS_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_1 on VPX_EVENT_1 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_2 on VPX_EVENT_2 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_3 on VPX_EVENT_3 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_4 on VPX_EVENT_4 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_5 on VPX_EVENT_5 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_6 on VPX_EVENT_6 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_7 on VPX_EVENT_7 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_8 on VPX_EVENT_8 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_9 on VPX_EVENT_9 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_10 on VPX_EVENT_10 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_11 on VPX_EVENT_11 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_12 on VPX_EVENT_12 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_13 on VPX_EVENT_13 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_14 on VPX_EVENT_14 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_15 on VPX_EVENT_15 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_16 on VPX_EVENT_16 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_17 on VPX_EVENT_17 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_18 on VPX_EVENT_18 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_19 on VPX_EVENT_19 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_20 on VPX_EVENT_20 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_21 on VPX_EVENT_21 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_22 on VPX_EVENT_22 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_23 on VPX_EVENT_23 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_24 on VPX_EVENT_24 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_25 on VPX_EVENT_25 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_26 on VPX_EVENT_26 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_27 on VPX_EVENT_27 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_28 on VPX_EVENT_28 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_29 on VPX_EVENT_29 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_30 on VPX_EVENT_30 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_31 on VPX_EVENT_31 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_32 on VPX_EVENT_32 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_33 on VPX_EVENT_33 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_34 on VPX_EVENT_34 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_35 on VPX_EVENT_35 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_36 on VPX_EVENT_36 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_37 on VPX_EVENT_37 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_38 on VPX_EVENT_38 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_39 on VPX_EVENT_39 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_40 on VPX_EVENT_40 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_41 on VPX_EVENT_41 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_42 on VPX_EVENT_42 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_43 on VPX_EVENT_43 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_44 on VPX_EVENT_44 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_45 on VPX_EVENT_45 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_46 on VPX_EVENT_46 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_47 on VPX_EVENT_47 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_48 on VPX_EVENT_48 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_49 on VPX_EVENT_49 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_50 on VPX_EVENT_50 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_51 on VPX_EVENT_51 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_52 on VPX_EVENT_52 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_53 on VPX_EVENT_53 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_54 on VPX_EVENT_54 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_55 on VPX_EVENT_55 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_56 on VPX_EVENT_56 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_57 on VPX_EVENT_57 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_58 on VPX_EVENT_58 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_59 on VPX_EVENT_59 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_60 on VPX_EVENT_60 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_61 on VPX_EVENT_61 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_62 on VPX_EVENT_62 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_63 on VPX_EVENT_63 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_64 on VPX_EVENT_64 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_65 on VPX_EVENT_65 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_66 on VPX_EVENT_66 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_67 on VPX_EVENT_67 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_68 on VPX_EVENT_68 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_69 on VPX_EVENT_69 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_70 on VPX_EVENT_70 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_71 on VPX_EVENT_71 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_72 on VPX_EVENT_72 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_73 on VPX_EVENT_73 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_74 on VPX_EVENT_74 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_75 on VPX_EVENT_75 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_76 on VPX_EVENT_76 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_77 on VPX_EVENT_77 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_78 on VPX_EVENT_78 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_79 on VPX_EVENT_79 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_80 on VPX_EVENT_80 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_81 on VPX_EVENT_81 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_82 on VPX_EVENT_82 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_83 on VPX_EVENT_83 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_84 on VPX_EVENT_84 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_85 on VPX_EVENT_85 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_86 on VPX_EVENT_86 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_87 on VPX_EVENT_87 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_88 on VPX_EVENT_88 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_89 on VPX_EVENT_89 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_90 on VPX_EVENT_90 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_91 on VPX_EVENT_91 ( EXTENDED_CLASS);
CREATE INDEX VPXI_EVENT_EXTENDED_CLASS_92 on VPX_EVENT_92 ( EXTENDED_CLASS);

/*==============================================================*/
/* Index VPXI_EVENT_HOST_ID_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_HOST_ID_1 on VPX_EVENT_1 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_2 on VPX_EVENT_2 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_3 on VPX_EVENT_3 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_4 on VPX_EVENT_4 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_5 on VPX_EVENT_5 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_6 on VPX_EVENT_6 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_7 on VPX_EVENT_7 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_8 on VPX_EVENT_8 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_9 on VPX_EVENT_9 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_10 on VPX_EVENT_10 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_11 on VPX_EVENT_11 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_12 on VPX_EVENT_12 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_13 on VPX_EVENT_13 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_14 on VPX_EVENT_14 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_15 on VPX_EVENT_15 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_16 on VPX_EVENT_16 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_17 on VPX_EVENT_17 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_18 on VPX_EVENT_18 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_19 on VPX_EVENT_19 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_20 on VPX_EVENT_20 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_21 on VPX_EVENT_21 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_22 on VPX_EVENT_22 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_23 on VPX_EVENT_23 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_24 on VPX_EVENT_24 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_25 on VPX_EVENT_25 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_26 on VPX_EVENT_26 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_27 on VPX_EVENT_27 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_28 on VPX_EVENT_28 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_29 on VPX_EVENT_29 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_30 on VPX_EVENT_30 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_31 on VPX_EVENT_31 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_32 on VPX_EVENT_32 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_33 on VPX_EVENT_33 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_34 on VPX_EVENT_34 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_35 on VPX_EVENT_35 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_36 on VPX_EVENT_36 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_37 on VPX_EVENT_37 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_38 on VPX_EVENT_38 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_39 on VPX_EVENT_39 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_40 on VPX_EVENT_40 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_41 on VPX_EVENT_41 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_42 on VPX_EVENT_42 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_43 on VPX_EVENT_43 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_44 on VPX_EVENT_44 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_45 on VPX_EVENT_45 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_46 on VPX_EVENT_46 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_47 on VPX_EVENT_47 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_48 on VPX_EVENT_48 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_49 on VPX_EVENT_49 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_50 on VPX_EVENT_50 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_51 on VPX_EVENT_51 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_52 on VPX_EVENT_52 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_53 on VPX_EVENT_53 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_54 on VPX_EVENT_54 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_55 on VPX_EVENT_55 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_56 on VPX_EVENT_56 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_57 on VPX_EVENT_57 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_58 on VPX_EVENT_58 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_59 on VPX_EVENT_59 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_60 on VPX_EVENT_60 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_61 on VPX_EVENT_61 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_62 on VPX_EVENT_62 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_63 on VPX_EVENT_63 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_64 on VPX_EVENT_64 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_65 on VPX_EVENT_65 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_66 on VPX_EVENT_66 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_67 on VPX_EVENT_67 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_68 on VPX_EVENT_68 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_69 on VPX_EVENT_69 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_70 on VPX_EVENT_70 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_71 on VPX_EVENT_71 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_72 on VPX_EVENT_72 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_73 on VPX_EVENT_73 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_74 on VPX_EVENT_74 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_75 on VPX_EVENT_75 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_76 on VPX_EVENT_76 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_77 on VPX_EVENT_77 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_78 on VPX_EVENT_78 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_79 on VPX_EVENT_79 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_80 on VPX_EVENT_80 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_81 on VPX_EVENT_81 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_82 on VPX_EVENT_82 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_83 on VPX_EVENT_83 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_84 on VPX_EVENT_84 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_85 on VPX_EVENT_85 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_86 on VPX_EVENT_86 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_87 on VPX_EVENT_87 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_88 on VPX_EVENT_88 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_89 on VPX_EVENT_89 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_90 on VPX_EVENT_90 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_91 on VPX_EVENT_91 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_HOST_ID_92 on VPX_EVENT_92 ( HOST_ID)  WHERE HOST_ID IS NOT NULL;

/*==============================================================*/
/* Index VPXI_EVENT_USERNAME_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_USERNAME_1 on VPX_EVENT_1 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_2 on VPX_EVENT_2 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_3 on VPX_EVENT_3 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_4 on VPX_EVENT_4 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_5 on VPX_EVENT_5 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_6 on VPX_EVENT_6 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_7 on VPX_EVENT_7 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_8 on VPX_EVENT_8 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_9 on VPX_EVENT_9 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_10 on VPX_EVENT_10 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_11 on VPX_EVENT_11 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_12 on VPX_EVENT_12 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_13 on VPX_EVENT_13 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_14 on VPX_EVENT_14 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_15 on VPX_EVENT_15 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_16 on VPX_EVENT_16 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_17 on VPX_EVENT_17 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_18 on VPX_EVENT_18 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_19 on VPX_EVENT_19 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_20 on VPX_EVENT_20 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_21 on VPX_EVENT_21 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_22 on VPX_EVENT_22 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_23 on VPX_EVENT_23 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_24 on VPX_EVENT_24 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_25 on VPX_EVENT_25 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_26 on VPX_EVENT_26 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_27 on VPX_EVENT_27 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_28 on VPX_EVENT_28 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_29 on VPX_EVENT_29 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_30 on VPX_EVENT_30 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_31 on VPX_EVENT_31 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_32 on VPX_EVENT_32 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_33 on VPX_EVENT_33 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_34 on VPX_EVENT_34 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_35 on VPX_EVENT_35 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_36 on VPX_EVENT_36 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_37 on VPX_EVENT_37 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_38 on VPX_EVENT_38 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_39 on VPX_EVENT_39 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_40 on VPX_EVENT_40 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_41 on VPX_EVENT_41 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_42 on VPX_EVENT_42 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_43 on VPX_EVENT_43 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_44 on VPX_EVENT_44 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_45 on VPX_EVENT_45 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_46 on VPX_EVENT_46 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_47 on VPX_EVENT_47 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_48 on VPX_EVENT_48 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_49 on VPX_EVENT_49 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_50 on VPX_EVENT_50 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_51 on VPX_EVENT_51 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_52 on VPX_EVENT_52 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_53 on VPX_EVENT_53 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_54 on VPX_EVENT_54 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_55 on VPX_EVENT_55 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_56 on VPX_EVENT_56 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_57 on VPX_EVENT_57 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_58 on VPX_EVENT_58 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_59 on VPX_EVENT_59 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_60 on VPX_EVENT_60 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_61 on VPX_EVENT_61 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_62 on VPX_EVENT_62 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_63 on VPX_EVENT_63 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_64 on VPX_EVENT_64 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_65 on VPX_EVENT_65 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_66 on VPX_EVENT_66 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_67 on VPX_EVENT_67 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_68 on VPX_EVENT_68 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_69 on VPX_EVENT_69 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_70 on VPX_EVENT_70 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_71 on VPX_EVENT_71 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_72 on VPX_EVENT_72 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_73 on VPX_EVENT_73 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_74 on VPX_EVENT_74 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_75 on VPX_EVENT_75 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_76 on VPX_EVENT_76 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_77 on VPX_EVENT_77 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_78 on VPX_EVENT_78 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_79 on VPX_EVENT_79 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_80 on VPX_EVENT_80 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_81 on VPX_EVENT_81 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_82 on VPX_EVENT_82 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_83 on VPX_EVENT_83 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_84 on VPX_EVENT_84 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_85 on VPX_EVENT_85 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_86 on VPX_EVENT_86 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_87 on VPX_EVENT_87 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_88 on VPX_EVENT_88 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_89 on VPX_EVENT_89 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_90 on VPX_EVENT_90 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_91 on VPX_EVENT_91 (USERNAME)  WHERE USERNAME IS NOT NULL;
CREATE INDEX VPXI_EVENT_USERNAME_92 on VPX_EVENT_92 (USERNAME)  WHERE USERNAME IS NOT NULL;

/*==============================================================*/
/* Index VPXI_EVENT_VM_ID_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_VM_ID_1 on VPX_EVENT_1 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_2 on VPX_EVENT_2 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_3 on VPX_EVENT_3 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_4 on VPX_EVENT_4 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_5 on VPX_EVENT_5 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_6 on VPX_EVENT_6 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_7 on VPX_EVENT_7 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_8 on VPX_EVENT_8 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_9 on VPX_EVENT_9 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_10 on VPX_EVENT_10 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_11 on VPX_EVENT_11 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_12 on VPX_EVENT_12 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_13 on VPX_EVENT_13 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_14 on VPX_EVENT_14 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_15 on VPX_EVENT_15 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_16 on VPX_EVENT_16 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_17 on VPX_EVENT_17 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_18 on VPX_EVENT_18 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_19 on VPX_EVENT_19 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_20 on VPX_EVENT_20 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_21 on VPX_EVENT_21 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_22 on VPX_EVENT_22 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_23 on VPX_EVENT_23 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_24 on VPX_EVENT_24 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_25 on VPX_EVENT_25 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_26 on VPX_EVENT_26 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_27 on VPX_EVENT_27 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_28 on VPX_EVENT_28 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_29 on VPX_EVENT_29 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_30 on VPX_EVENT_30 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_31 on VPX_EVENT_31 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_32 on VPX_EVENT_32 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_33 on VPX_EVENT_33 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_34 on VPX_EVENT_34 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_35 on VPX_EVENT_35 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_36 on VPX_EVENT_36 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_37 on VPX_EVENT_37 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_38 on VPX_EVENT_38 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_39 on VPX_EVENT_39 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_40 on VPX_EVENT_40 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_41 on VPX_EVENT_41 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_42 on VPX_EVENT_42 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_43 on VPX_EVENT_43 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_44 on VPX_EVENT_44 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_45 on VPX_EVENT_45 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_46 on VPX_EVENT_46 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_47 on VPX_EVENT_47 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_48 on VPX_EVENT_48 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_49 on VPX_EVENT_49 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_50 on VPX_EVENT_50 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_51 on VPX_EVENT_51 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_52 on VPX_EVENT_52 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_53 on VPX_EVENT_53 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_54 on VPX_EVENT_54 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_55 on VPX_EVENT_55 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_56 on VPX_EVENT_56 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_57 on VPX_EVENT_57 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_58 on VPX_EVENT_58 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_59 on VPX_EVENT_59 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_60 on VPX_EVENT_60 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_61 on VPX_EVENT_61 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_62 on VPX_EVENT_62 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_63 on VPX_EVENT_63 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_64 on VPX_EVENT_64 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_65 on VPX_EVENT_65 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_66 on VPX_EVENT_66 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_67 on VPX_EVENT_67 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_68 on VPX_EVENT_68 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_69 on VPX_EVENT_69 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_70 on VPX_EVENT_70 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_71 on VPX_EVENT_71 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_72 on VPX_EVENT_72 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_73 on VPX_EVENT_73 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_74 on VPX_EVENT_74 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_75 on VPX_EVENT_75 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_76 on VPX_EVENT_76 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_77 on VPX_EVENT_77 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_78 on VPX_EVENT_78 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_79 on VPX_EVENT_79 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_80 on VPX_EVENT_80 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_81 on VPX_EVENT_81 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_82 on VPX_EVENT_82 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_83 on VPX_EVENT_83 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_84 on VPX_EVENT_84 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_85 on VPX_EVENT_85 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_86 on VPX_EVENT_86 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_87 on VPX_EVENT_87 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_88 on VPX_EVENT_88 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_89 on VPX_EVENT_89 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_90 on VPX_EVENT_90 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_91 on VPX_EVENT_91 (VM_ID)  WHERE VM_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_VM_ID_92 on VPX_EVENT_92 (VM_ID)  WHERE VM_ID IS NOT NULL;

/*==============================================================*/
/* Index VPXI_CHANGE_TAG_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_CHANGE_TAG_1 on VPX_EVENT_1 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_2 on VPX_EVENT_2 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_3 on VPX_EVENT_3 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_4 on VPX_EVENT_4 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_5 on VPX_EVENT_5 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_6 on VPX_EVENT_6 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_7 on VPX_EVENT_7 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_8 on VPX_EVENT_8 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_9 on VPX_EVENT_9 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_10 on VPX_EVENT_10 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_11 on VPX_EVENT_11 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_12 on VPX_EVENT_12 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_13 on VPX_EVENT_13 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_14 on VPX_EVENT_14 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_15 on VPX_EVENT_15 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_16 on VPX_EVENT_16 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_17 on VPX_EVENT_17 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_18 on VPX_EVENT_18 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_19 on VPX_EVENT_19 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_20 on VPX_EVENT_20 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_21 on VPX_EVENT_21 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_22 on VPX_EVENT_22 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_23 on VPX_EVENT_23 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_24 on VPX_EVENT_24 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_25 on VPX_EVENT_25 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_26 on VPX_EVENT_26 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_27 on VPX_EVENT_27 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_28 on VPX_EVENT_28 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_29 on VPX_EVENT_29 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_30 on VPX_EVENT_30 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_31 on VPX_EVENT_31 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_32 on VPX_EVENT_32 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_33 on VPX_EVENT_33 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_34 on VPX_EVENT_34 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_35 on VPX_EVENT_35 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_36 on VPX_EVENT_36 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_37 on VPX_EVENT_37 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_38 on VPX_EVENT_38 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_39 on VPX_EVENT_39 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_40 on VPX_EVENT_40 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_41 on VPX_EVENT_41 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_42 on VPX_EVENT_42 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_43 on VPX_EVENT_43 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_44 on VPX_EVENT_44 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_45 on VPX_EVENT_45 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_46 on VPX_EVENT_46 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_47 on VPX_EVENT_47 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_48 on VPX_EVENT_48 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_49 on VPX_EVENT_49 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_50 on VPX_EVENT_50 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_51 on VPX_EVENT_51 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_52 on VPX_EVENT_52 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_53 on VPX_EVENT_53 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_54 on VPX_EVENT_54 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_55 on VPX_EVENT_55 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_56 on VPX_EVENT_56 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_57 on VPX_EVENT_57 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_58 on VPX_EVENT_58 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_59 on VPX_EVENT_59 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_60 on VPX_EVENT_60 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_61 on VPX_EVENT_61 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_62 on VPX_EVENT_62 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_63 on VPX_EVENT_63 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_64 on VPX_EVENT_64 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_65 on VPX_EVENT_65 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_66 on VPX_EVENT_66 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_67 on VPX_EVENT_67 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_68 on VPX_EVENT_68 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_69 on VPX_EVENT_69 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_70 on VPX_EVENT_70 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_71 on VPX_EVENT_71 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_72 on VPX_EVENT_72 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_73 on VPX_EVENT_73 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_74 on VPX_EVENT_74 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_75 on VPX_EVENT_75 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_76 on VPX_EVENT_76 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_77 on VPX_EVENT_77 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_78 on VPX_EVENT_78 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_79 on VPX_EVENT_79 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_80 on VPX_EVENT_80 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_81 on VPX_EVENT_81 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_82 on VPX_EVENT_82 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_83 on VPX_EVENT_83 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_84 on VPX_EVENT_84 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_85 on VPX_EVENT_85 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_86 on VPX_EVENT_86 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_87 on VPX_EVENT_87 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_88 on VPX_EVENT_88 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_89 on VPX_EVENT_89 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_90 on VPX_EVENT_90 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_91 on VPX_EVENT_91 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;
CREATE INDEX VPXI_CHANGE_TAG_92 on VPX_EVENT_92 (CHANGE_TAG_ID) WHERE CHANGE_TAG_ID IS NOT NULL;

/*==============================================================*/
/* Index VPXI_EVENT_NETWORK_ID_x                                  */
/*==============================================================*/
CREATE INDEX VPXI_EVENT_NETWORK_ID_1 on VPX_EVENT_1 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_2 on VPX_EVENT_2 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_3 on VPX_EVENT_3 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_4 on VPX_EVENT_4 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_5 on VPX_EVENT_5 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_6 on VPX_EVENT_6 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_7 on VPX_EVENT_7 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_8 on VPX_EVENT_8 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_9 on VPX_EVENT_9 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_10 on VPX_EVENT_10 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_11 on VPX_EVENT_11 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_12 on VPX_EVENT_12 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_13 on VPX_EVENT_13 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_14 on VPX_EVENT_14 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_15 on VPX_EVENT_15 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_16 on VPX_EVENT_16 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_17 on VPX_EVENT_17 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_18 on VPX_EVENT_18 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_19 on VPX_EVENT_19 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_20 on VPX_EVENT_20 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_21 on VPX_EVENT_21 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_22 on VPX_EVENT_22 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_23 on VPX_EVENT_23 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_24 on VPX_EVENT_24 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_25 on VPX_EVENT_25 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_26 on VPX_EVENT_26 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_27 on VPX_EVENT_27 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_28 on VPX_EVENT_28 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_29 on VPX_EVENT_29 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_30 on VPX_EVENT_30 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_31 on VPX_EVENT_31 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_32 on VPX_EVENT_32 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_33 on VPX_EVENT_33 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_34 on VPX_EVENT_34 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_35 on VPX_EVENT_35 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_36 on VPX_EVENT_36 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_37 on VPX_EVENT_37 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_38 on VPX_EVENT_38 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_39 on VPX_EVENT_39 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_40 on VPX_EVENT_40 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_41 on VPX_EVENT_41 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_42 on VPX_EVENT_42 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_43 on VPX_EVENT_43 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_44 on VPX_EVENT_44 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_45 on VPX_EVENT_45 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_46 on VPX_EVENT_46 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_47 on VPX_EVENT_47 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_48 on VPX_EVENT_48 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_49 on VPX_EVENT_49 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_50 on VPX_EVENT_50 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_51 on VPX_EVENT_51 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_52 on VPX_EVENT_52 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_53 on VPX_EVENT_53 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_54 on VPX_EVENT_54 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_55 on VPX_EVENT_55 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_56 on VPX_EVENT_56 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_57 on VPX_EVENT_57 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_58 on VPX_EVENT_58 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_59 on VPX_EVENT_59 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_60 on VPX_EVENT_60 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_61 on VPX_EVENT_61 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_62 on VPX_EVENT_62 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_63 on VPX_EVENT_63 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_64 on VPX_EVENT_64 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_65 on VPX_EVENT_65 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_66 on VPX_EVENT_66 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_67 on VPX_EVENT_67 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_68 on VPX_EVENT_68 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_69 on VPX_EVENT_69 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_70 on VPX_EVENT_70 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_71 on VPX_EVENT_71 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_72 on VPX_EVENT_72 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_73 on VPX_EVENT_73 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_74 on VPX_EVENT_74 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_75 on VPX_EVENT_75 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_76 on VPX_EVENT_76 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_77 on VPX_EVENT_77 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_78 on VPX_EVENT_78 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_79 on VPX_EVENT_79 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_80 on VPX_EVENT_80 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_81 on VPX_EVENT_81 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_82 on VPX_EVENT_82 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_83 on VPX_EVENT_83 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_84 on VPX_EVENT_84 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_85 on VPX_EVENT_85 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_86 on VPX_EVENT_86 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_87 on VPX_EVENT_87 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_88 on VPX_EVENT_88 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_89 on VPX_EVENT_89 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_90 on VPX_EVENT_90 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_91 on VPX_EVENT_91 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;
CREATE INDEX VPXI_EVENT_NETWORK_ID_92 on VPX_EVENT_92 (NETWORK_ID) WHERE NETWORK_ID IS NOT NULL;

/*==============================================================*/
/* Index VPX_EVENT_F1_1                                     */
/*==============================================================*/
CREATE INDEX VPX_EVENT_F1_1 ON VPX_EVENT_1 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_2 ON VPX_EVENT_2 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_3 ON VPX_EVENT_3 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_4 ON VPX_EVENT_4 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_5 ON VPX_EVENT_5 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_6 ON VPX_EVENT_6 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_7 ON VPX_EVENT_7 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_8 ON VPX_EVENT_8 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_9 ON VPX_EVENT_9 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_10 ON VPX_EVENT_10 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_11 ON VPX_EVENT_11 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_12 ON VPX_EVENT_12 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_13 ON VPX_EVENT_13 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_14 ON VPX_EVENT_14 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_15 ON VPX_EVENT_15 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_16 ON VPX_EVENT_16 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_17 ON VPX_EVENT_17 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_18 ON VPX_EVENT_18 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_19 ON VPX_EVENT_19 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_20 ON VPX_EVENT_20 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_21 ON VPX_EVENT_21 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_22 ON VPX_EVENT_22 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_23 ON VPX_EVENT_23 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_24 ON VPX_EVENT_24 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_25 ON VPX_EVENT_25 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_26 ON VPX_EVENT_26 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_27 ON VPX_EVENT_27 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_28 ON VPX_EVENT_28 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_29 ON VPX_EVENT_29 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_30 ON VPX_EVENT_30 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_31 ON VPX_EVENT_31 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_32 ON VPX_EVENT_32 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_33 ON VPX_EVENT_33 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_34 ON VPX_EVENT_34 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_35 ON VPX_EVENT_35 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_36 ON VPX_EVENT_36 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_37 ON VPX_EVENT_37 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_38 ON VPX_EVENT_38 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_39 ON VPX_EVENT_39 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_40 ON VPX_EVENT_40 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_41 ON VPX_EVENT_41 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_42 ON VPX_EVENT_42 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_43 ON VPX_EVENT_43 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_44 ON VPX_EVENT_44 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_45 ON VPX_EVENT_45 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_46 ON VPX_EVENT_46 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_47 ON VPX_EVENT_47 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_48 ON VPX_EVENT_48 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_49 ON VPX_EVENT_49 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_50 ON VPX_EVENT_50 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_51 ON VPX_EVENT_51 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_52 ON VPX_EVENT_52 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_53 ON VPX_EVENT_53 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_54 ON VPX_EVENT_54 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_55 ON VPX_EVENT_55 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_56 ON VPX_EVENT_56 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_57 ON VPX_EVENT_57 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_58 ON VPX_EVENT_58 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_59 ON VPX_EVENT_59 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_60 ON VPX_EVENT_60 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_61 ON VPX_EVENT_61 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_62 ON VPX_EVENT_62 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_63 ON VPX_EVENT_63 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_64 ON VPX_EVENT_64 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_65 ON VPX_EVENT_65 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_66 ON VPX_EVENT_66 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_67 ON VPX_EVENT_67 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_68 ON VPX_EVENT_68 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_69 ON VPX_EVENT_69 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_70 ON VPX_EVENT_70 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_71 ON VPX_EVENT_71 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_72 ON VPX_EVENT_72 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_73 ON VPX_EVENT_73 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_74 ON VPX_EVENT_74 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_75 ON VPX_EVENT_75 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_76 ON VPX_EVENT_76 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_77 ON VPX_EVENT_77 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_78 ON VPX_EVENT_78 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_79 ON VPX_EVENT_79 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_80 ON VPX_EVENT_80 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_81 ON VPX_EVENT_81 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_82 ON VPX_EVENT_82 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_83 ON VPX_EVENT_83 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_84 ON VPX_EVENT_84 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_85 ON VPX_EVENT_85 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_86 ON VPX_EVENT_86 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_87 ON VPX_EVENT_87 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_88 ON VPX_EVENT_88 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_89 ON VPX_EVENT_89 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_90 ON VPX_EVENT_90 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_91 ON VPX_EVENT_91 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;
CREATE INDEX VPX_EVENT_F1_92 ON VPX_EVENT_92 (COMPUTERESOURCE_TYPE) WHERE COMPUTERESOURCE_TYPE IS NOT NULL;


/*==============================================================*/
/* Table: VPX_EVENT_ARG_1                                       */
/*==============================================================*/
create table VPX_EVENT_ARG_1 (
   EVENT_ID             INTEGER                   not null,
   ARG_ID               INTEGER                  not null,
   ARG_TYPE             VARCHAR(255),
   ARG_DATA             TEXT,
   OBJ_TYPE             INTEGER,
   OBJ_NAME             VARCHAR(255),
   VM_ID                BIGINT,
   HOST_ID              BIGINT,
   COMPUTERESOURCE_ID   BIGINT,
   DATASTORE_ID         BIGINT,
   NETWORK_ID           BIGINT,
   NETWORK_TYPE         CHAR(1),
   DATACENTER_ID        BIGINT,
   RESOURCEPOOL_ID      BIGINT,
   DVS_ID               BIGINT,
   FOLDER_ID            BIGINT,
   ALARM_ID             BIGINT,
   SCHEDULEDTASK_ID     BIGINT,
   constraint PK_VPX_EVENT_ARG_1 primary key  (EVENT_ID, ARG_ID)
)
;


CREATE TABLE VPX_EVENT_ARG_2 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_3 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_4 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_5 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_6 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_7 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_8 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_9 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_10 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_11 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_12 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_13 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_14 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_15 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_16 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_17 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_18 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_19 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_20 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_21 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_22 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_23 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_24 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_25 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_26 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_27 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_28 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_29 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_30 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_31 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_32 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_33 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_34 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_35 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_36 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_37 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_38 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_39 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_40 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_41 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_42 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_43 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_44 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_45 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_46 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_47 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_48 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_49 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_50 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_51 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_52 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_53 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_54 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_55 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_56 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_57 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_58 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_59 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_60 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_61 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_62 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_63 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_64 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_65 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_66 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_67 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_68 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_69 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_70 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_71 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_72 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_73 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_74 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_75 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_76 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_77 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_78 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_79 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_80 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_81 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_82 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_83 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_84 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_85 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_86 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_87 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_88 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_89 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_90 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_91 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);
CREATE TABLE VPX_EVENT_ARG_92 (LIKE VPX_EVENT_ARG_1 INCLUDING DEFAULTS);

/*==============================================================*/
/* Primary Keys of VPX_EVENT_ARG_x                              */
/*==============================================================*/
ALTER TABLE VPX_EVENT_ARG_2 ADD CONSTRAINT PK_VPX_EVENT_ARG_2 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_3 ADD CONSTRAINT PK_VPX_EVENT_ARG_3 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_4 ADD CONSTRAINT PK_VPX_EVENT_ARG_4 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_5 ADD CONSTRAINT PK_VPX_EVENT_ARG_5 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_6 ADD CONSTRAINT PK_VPX_EVENT_ARG_6 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_7 ADD CONSTRAINT PK_VPX_EVENT_ARG_7 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_8 ADD CONSTRAINT PK_VPX_EVENT_ARG_8 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_9 ADD CONSTRAINT PK_VPX_EVENT_ARG_9 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_10 ADD CONSTRAINT PK_VPX_EVENT_ARG_10 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_11 ADD CONSTRAINT PK_VPX_EVENT_ARG_11 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_12 ADD CONSTRAINT PK_VPX_EVENT_ARG_12 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_13 ADD CONSTRAINT PK_VPX_EVENT_ARG_13 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_14 ADD CONSTRAINT PK_VPX_EVENT_ARG_14 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_15 ADD CONSTRAINT PK_VPX_EVENT_ARG_15 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_16 ADD CONSTRAINT PK_VPX_EVENT_ARG_16 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_17 ADD CONSTRAINT PK_VPX_EVENT_ARG_17 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_18 ADD CONSTRAINT PK_VPX_EVENT_ARG_18 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_19 ADD CONSTRAINT PK_VPX_EVENT_ARG_19 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_20 ADD CONSTRAINT PK_VPX_EVENT_ARG_20 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_21 ADD CONSTRAINT PK_VPX_EVENT_ARG_21 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_22 ADD CONSTRAINT PK_VPX_EVENT_ARG_22 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_23 ADD CONSTRAINT PK_VPX_EVENT_ARG_23 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_24 ADD CONSTRAINT PK_VPX_EVENT_ARG_24 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_25 ADD CONSTRAINT PK_VPX_EVENT_ARG_25 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_26 ADD CONSTRAINT PK_VPX_EVENT_ARG_26 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_27 ADD CONSTRAINT PK_VPX_EVENT_ARG_27 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_28 ADD CONSTRAINT PK_VPX_EVENT_ARG_28 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_29 ADD CONSTRAINT PK_VPX_EVENT_ARG_29 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_30 ADD CONSTRAINT PK_VPX_EVENT_ARG_30 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_31 ADD CONSTRAINT PK_VPX_EVENT_ARG_31 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_32 ADD CONSTRAINT PK_VPX_EVENT_ARG_32 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_33 ADD CONSTRAINT PK_VPX_EVENT_ARG_33 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_34 ADD CONSTRAINT PK_VPX_EVENT_ARG_34 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_35 ADD CONSTRAINT PK_VPX_EVENT_ARG_35 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_36 ADD CONSTRAINT PK_VPX_EVENT_ARG_36 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_37 ADD CONSTRAINT PK_VPX_EVENT_ARG_37 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_38 ADD CONSTRAINT PK_VPX_EVENT_ARG_38 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_39 ADD CONSTRAINT PK_VPX_EVENT_ARG_39 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_40 ADD CONSTRAINT PK_VPX_EVENT_ARG_40 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_41 ADD CONSTRAINT PK_VPX_EVENT_ARG_41 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_42 ADD CONSTRAINT PK_VPX_EVENT_ARG_42 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_43 ADD CONSTRAINT PK_VPX_EVENT_ARG_43 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_44 ADD CONSTRAINT PK_VPX_EVENT_ARG_44 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_45 ADD CONSTRAINT PK_VPX_EVENT_ARG_45 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_46 ADD CONSTRAINT PK_VPX_EVENT_ARG_46 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_47 ADD CONSTRAINT PK_VPX_EVENT_ARG_47 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_48 ADD CONSTRAINT PK_VPX_EVENT_ARG_48 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_49 ADD CONSTRAINT PK_VPX_EVENT_ARG_49 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_50 ADD CONSTRAINT PK_VPX_EVENT_ARG_50 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_51 ADD CONSTRAINT PK_VPX_EVENT_ARG_51 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_52 ADD CONSTRAINT PK_VPX_EVENT_ARG_52 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_53 ADD CONSTRAINT PK_VPX_EVENT_ARG_53 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_54 ADD CONSTRAINT PK_VPX_EVENT_ARG_54 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_55 ADD CONSTRAINT PK_VPX_EVENT_ARG_55 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_56 ADD CONSTRAINT PK_VPX_EVENT_ARG_56 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_57 ADD CONSTRAINT PK_VPX_EVENT_ARG_57 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_58 ADD CONSTRAINT PK_VPX_EVENT_ARG_58 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_59 ADD CONSTRAINT PK_VPX_EVENT_ARG_59 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_60 ADD CONSTRAINT PK_VPX_EVENT_ARG_60 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_61 ADD CONSTRAINT PK_VPX_EVENT_ARG_61 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_62 ADD CONSTRAINT PK_VPX_EVENT_ARG_62 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_63 ADD CONSTRAINT PK_VPX_EVENT_ARG_63 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_64 ADD CONSTRAINT PK_VPX_EVENT_ARG_64 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_65 ADD CONSTRAINT PK_VPX_EVENT_ARG_65 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_66 ADD CONSTRAINT PK_VPX_EVENT_ARG_66 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_67 ADD CONSTRAINT PK_VPX_EVENT_ARG_67 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_68 ADD CONSTRAINT PK_VPX_EVENT_ARG_68 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_69 ADD CONSTRAINT PK_VPX_EVENT_ARG_69 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_70 ADD CONSTRAINT PK_VPX_EVENT_ARG_70 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_71 ADD CONSTRAINT PK_VPX_EVENT_ARG_71 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_72 ADD CONSTRAINT PK_VPX_EVENT_ARG_72 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_73 ADD CONSTRAINT PK_VPX_EVENT_ARG_73 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_74 ADD CONSTRAINT PK_VPX_EVENT_ARG_74 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_75 ADD CONSTRAINT PK_VPX_EVENT_ARG_75 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_76 ADD CONSTRAINT PK_VPX_EVENT_ARG_76 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_77 ADD CONSTRAINT PK_VPX_EVENT_ARG_77 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_78 ADD CONSTRAINT PK_VPX_EVENT_ARG_78 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_79 ADD CONSTRAINT PK_VPX_EVENT_ARG_79 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_80 ADD CONSTRAINT PK_VPX_EVENT_ARG_80 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_81 ADD CONSTRAINT PK_VPX_EVENT_ARG_81 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_82 ADD CONSTRAINT PK_VPX_EVENT_ARG_82 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_83 ADD CONSTRAINT PK_VPX_EVENT_ARG_83 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_84 ADD CONSTRAINT PK_VPX_EVENT_ARG_84 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_85 ADD CONSTRAINT PK_VPX_EVENT_ARG_85 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_86 ADD CONSTRAINT PK_VPX_EVENT_ARG_86 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_87 ADD CONSTRAINT PK_VPX_EVENT_ARG_87 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_88 ADD CONSTRAINT PK_VPX_EVENT_ARG_88 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_89 ADD CONSTRAINT PK_VPX_EVENT_ARG_89 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_90 ADD CONSTRAINT PK_VPX_EVENT_ARG_90 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_91 ADD CONSTRAINT PK_VPX_EVENT_ARG_91 primary key  (EVENT_ID, ARG_ID);
ALTER TABLE VPX_EVENT_ARG_92 ADD CONSTRAINT PK_VPX_EVENT_ARG_92 primary key  (EVENT_ID, ARG_ID);


/*==============================================================*/
/* Index VPX_EVENT_ARG_F1_x                                     */
/*==============================================================*/
CREATE INDEX VPX_EVENT_ARG_F1_1 ON VPX_EVENT_ARG_1 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_2 ON VPX_EVENT_ARG_2 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_3 ON VPX_EVENT_ARG_3 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_4 ON VPX_EVENT_ARG_4 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_5 ON VPX_EVENT_ARG_5 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_6 ON VPX_EVENT_ARG_6 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_7 ON VPX_EVENT_ARG_7 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_8 ON VPX_EVENT_ARG_8 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_9 ON VPX_EVENT_ARG_9 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_10 ON VPX_EVENT_ARG_10 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_11 ON VPX_EVENT_ARG_11 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_12 ON VPX_EVENT_ARG_12 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_13 ON VPX_EVENT_ARG_13 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_14 ON VPX_EVENT_ARG_14 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_15 ON VPX_EVENT_ARG_15 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_16 ON VPX_EVENT_ARG_16 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_17 ON VPX_EVENT_ARG_17 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_18 ON VPX_EVENT_ARG_18 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_19 ON VPX_EVENT_ARG_19 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_20 ON VPX_EVENT_ARG_20 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_21 ON VPX_EVENT_ARG_21 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_22 ON VPX_EVENT_ARG_22 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_23 ON VPX_EVENT_ARG_23 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_24 ON VPX_EVENT_ARG_24 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_25 ON VPX_EVENT_ARG_25 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_26 ON VPX_EVENT_ARG_26 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_27 ON VPX_EVENT_ARG_27 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_28 ON VPX_EVENT_ARG_28 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_29 ON VPX_EVENT_ARG_29 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_30 ON VPX_EVENT_ARG_30 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_31 ON VPX_EVENT_ARG_31 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_32 ON VPX_EVENT_ARG_32 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_33 ON VPX_EVENT_ARG_33 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_34 ON VPX_EVENT_ARG_34 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_35 ON VPX_EVENT_ARG_35 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_36 ON VPX_EVENT_ARG_36 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_37 ON VPX_EVENT_ARG_37 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_38 ON VPX_EVENT_ARG_38 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_39 ON VPX_EVENT_ARG_39 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_40 ON VPX_EVENT_ARG_40 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_41 ON VPX_EVENT_ARG_41 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_42 ON VPX_EVENT_ARG_42 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_43 ON VPX_EVENT_ARG_43 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_44 ON VPX_EVENT_ARG_44 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_45 ON VPX_EVENT_ARG_45 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_46 ON VPX_EVENT_ARG_46 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_47 ON VPX_EVENT_ARG_47 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_48 ON VPX_EVENT_ARG_48 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_49 ON VPX_EVENT_ARG_49 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_50 ON VPX_EVENT_ARG_50 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_51 ON VPX_EVENT_ARG_51 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_52 ON VPX_EVENT_ARG_52 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_53 ON VPX_EVENT_ARG_53 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_54 ON VPX_EVENT_ARG_54 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_55 ON VPX_EVENT_ARG_55 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_56 ON VPX_EVENT_ARG_56 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_57 ON VPX_EVENT_ARG_57 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_58 ON VPX_EVENT_ARG_58 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_59 ON VPX_EVENT_ARG_59 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_60 ON VPX_EVENT_ARG_60 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_61 ON VPX_EVENT_ARG_61 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_62 ON VPX_EVENT_ARG_62 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_63 ON VPX_EVENT_ARG_63 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_64 ON VPX_EVENT_ARG_64 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_65 ON VPX_EVENT_ARG_65 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_66 ON VPX_EVENT_ARG_66 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_67 ON VPX_EVENT_ARG_67 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_68 ON VPX_EVENT_ARG_68 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_69 ON VPX_EVENT_ARG_69 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_70 ON VPX_EVENT_ARG_70 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_71 ON VPX_EVENT_ARG_71 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_72 ON VPX_EVENT_ARG_72 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_73 ON VPX_EVENT_ARG_73 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_74 ON VPX_EVENT_ARG_74 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_75 ON VPX_EVENT_ARG_75 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_76 ON VPX_EVENT_ARG_76 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_77 ON VPX_EVENT_ARG_77 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_78 ON VPX_EVENT_ARG_78 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_79 ON VPX_EVENT_ARG_79 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_80 ON VPX_EVENT_ARG_80 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_81 ON VPX_EVENT_ARG_81 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_82 ON VPX_EVENT_ARG_82 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_83 ON VPX_EVENT_ARG_83 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_84 ON VPX_EVENT_ARG_84 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_85 ON VPX_EVENT_ARG_85 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_86 ON VPX_EVENT_ARG_86 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_87 ON VPX_EVENT_ARG_87 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_88 ON VPX_EVENT_ARG_88 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_89 ON VPX_EVENT_ARG_89 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_90 ON VPX_EVENT_ARG_90 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_91 ON VPX_EVENT_ARG_91 (OBJ_TYPE);
CREATE INDEX VPX_EVENT_ARG_F1_92 ON VPX_EVENT_ARG_92 (OBJ_TYPE);

/*==============================================================*/
/* Index VPX_EVENT_ARG_F2_x                                     */
/*==============================================================*/
CREATE INDEX VPX_EVENT_ARG_F2_1 on VPX_EVENT_ARG_1 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_2 on VPX_EVENT_ARG_2 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_3 on VPX_EVENT_ARG_3 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_4 on VPX_EVENT_ARG_4 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_5 on VPX_EVENT_ARG_5 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_6 on VPX_EVENT_ARG_6 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_7 on VPX_EVENT_ARG_7 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_8 on VPX_EVENT_ARG_8 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_9 on VPX_EVENT_ARG_9 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_10 on VPX_EVENT_ARG_10 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_11 on VPX_EVENT_ARG_11 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_12 on VPX_EVENT_ARG_12 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_13 on VPX_EVENT_ARG_13 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_14 on VPX_EVENT_ARG_14 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_15 on VPX_EVENT_ARG_15 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_16 on VPX_EVENT_ARG_16 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_17 on VPX_EVENT_ARG_17 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_18 on VPX_EVENT_ARG_18 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_19 on VPX_EVENT_ARG_19 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_20 on VPX_EVENT_ARG_20 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_21 on VPX_EVENT_ARG_21 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_22 on VPX_EVENT_ARG_22 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_23 on VPX_EVENT_ARG_23 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_24 on VPX_EVENT_ARG_24 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_25 on VPX_EVENT_ARG_25 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_26 on VPX_EVENT_ARG_26 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_27 on VPX_EVENT_ARG_27 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_28 on VPX_EVENT_ARG_28 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_29 on VPX_EVENT_ARG_29 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_30 on VPX_EVENT_ARG_30 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_31 on VPX_EVENT_ARG_31 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_32 on VPX_EVENT_ARG_32 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_33 on VPX_EVENT_ARG_33 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_34 on VPX_EVENT_ARG_34 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_35 on VPX_EVENT_ARG_35 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_36 on VPX_EVENT_ARG_36 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_37 on VPX_EVENT_ARG_37 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_38 on VPX_EVENT_ARG_38 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_39 on VPX_EVENT_ARG_39 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_40 on VPX_EVENT_ARG_40 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_41 on VPX_EVENT_ARG_41 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_42 on VPX_EVENT_ARG_42 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_43 on VPX_EVENT_ARG_43 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_44 on VPX_EVENT_ARG_44 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_45 on VPX_EVENT_ARG_45 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_46 on VPX_EVENT_ARG_46 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_47 on VPX_EVENT_ARG_47 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_48 on VPX_EVENT_ARG_48 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_49 on VPX_EVENT_ARG_49 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_50 on VPX_EVENT_ARG_50 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_51 on VPX_EVENT_ARG_51 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_52 on VPX_EVENT_ARG_52 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_53 on VPX_EVENT_ARG_53 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_54 on VPX_EVENT_ARG_54 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_55 on VPX_EVENT_ARG_55 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_56 on VPX_EVENT_ARG_56 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_57 on VPX_EVENT_ARG_57 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_58 on VPX_EVENT_ARG_58 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_59 on VPX_EVENT_ARG_59 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_60 on VPX_EVENT_ARG_60 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_61 on VPX_EVENT_ARG_61 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_62 on VPX_EVENT_ARG_62 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_63 on VPX_EVENT_ARG_63 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_64 on VPX_EVENT_ARG_64 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_65 on VPX_EVENT_ARG_65 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_66 on VPX_EVENT_ARG_66 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_67 on VPX_EVENT_ARG_67 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_68 on VPX_EVENT_ARG_68 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_69 on VPX_EVENT_ARG_69 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_70 on VPX_EVENT_ARG_70 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_71 on VPX_EVENT_ARG_71 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_72 on VPX_EVENT_ARG_72 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_73 on VPX_EVENT_ARG_73 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_74 on VPX_EVENT_ARG_74 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_75 on VPX_EVENT_ARG_75 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_76 on VPX_EVENT_ARG_76 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_77 on VPX_EVENT_ARG_77 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_78 on VPX_EVENT_ARG_78 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_79 on VPX_EVENT_ARG_79 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_80 on VPX_EVENT_ARG_80 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_81 on VPX_EVENT_ARG_81 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_82 on VPX_EVENT_ARG_82 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_83 on VPX_EVENT_ARG_83 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_84 on VPX_EVENT_ARG_84 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_85 on VPX_EVENT_ARG_85 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_86 on VPX_EVENT_ARG_86 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_87 on VPX_EVENT_ARG_87 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_88 on VPX_EVENT_ARG_88 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_89 on VPX_EVENT_ARG_89 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_90 on VPX_EVENT_ARG_90 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_91 on VPX_EVENT_ARG_91 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F2_92 on VPX_EVENT_ARG_92 (ALARM_ID) WHERE ALARM_ID IS NOT NULL;

/*==============================================================*/
/* Index VPX_EVENT_ARG_F3_x                                     */
/*==============================================================*/
CREATE INDEX VPX_EVENT_ARG_F3_1 on VPX_EVENT_ARG_1 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_2 on VPX_EVENT_ARG_2 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_3 on VPX_EVENT_ARG_3 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_4 on VPX_EVENT_ARG_4 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_5 on VPX_EVENT_ARG_5 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_6 on VPX_EVENT_ARG_6 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_7 on VPX_EVENT_ARG_7 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_8 on VPX_EVENT_ARG_8 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_9 on VPX_EVENT_ARG_9 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_10 on VPX_EVENT_ARG_10 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_11 on VPX_EVENT_ARG_11 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_12 on VPX_EVENT_ARG_12 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_13 on VPX_EVENT_ARG_13 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_14 on VPX_EVENT_ARG_14 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_15 on VPX_EVENT_ARG_15 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_16 on VPX_EVENT_ARG_16 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_17 on VPX_EVENT_ARG_17 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_18 on VPX_EVENT_ARG_18 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_19 on VPX_EVENT_ARG_19 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_20 on VPX_EVENT_ARG_20 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_21 on VPX_EVENT_ARG_21 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_22 on VPX_EVENT_ARG_22 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_23 on VPX_EVENT_ARG_23 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_24 on VPX_EVENT_ARG_24 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_25 on VPX_EVENT_ARG_25 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_26 on VPX_EVENT_ARG_26 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_27 on VPX_EVENT_ARG_27 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_28 on VPX_EVENT_ARG_28 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_29 on VPX_EVENT_ARG_29 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_30 on VPX_EVENT_ARG_30 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_31 on VPX_EVENT_ARG_31 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_32 on VPX_EVENT_ARG_32 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_33 on VPX_EVENT_ARG_33 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_34 on VPX_EVENT_ARG_34 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_35 on VPX_EVENT_ARG_35 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_36 on VPX_EVENT_ARG_36 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_37 on VPX_EVENT_ARG_37 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_38 on VPX_EVENT_ARG_38 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_39 on VPX_EVENT_ARG_39 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_40 on VPX_EVENT_ARG_40 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_41 on VPX_EVENT_ARG_41 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_42 on VPX_EVENT_ARG_42 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_43 on VPX_EVENT_ARG_43 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_44 on VPX_EVENT_ARG_44 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_45 on VPX_EVENT_ARG_45 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_46 on VPX_EVENT_ARG_46 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_47 on VPX_EVENT_ARG_47 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_48 on VPX_EVENT_ARG_48 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_49 on VPX_EVENT_ARG_49 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_50 on VPX_EVENT_ARG_50 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_51 on VPX_EVENT_ARG_51 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_52 on VPX_EVENT_ARG_52 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_53 on VPX_EVENT_ARG_53 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_54 on VPX_EVENT_ARG_54 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_55 on VPX_EVENT_ARG_55 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_56 on VPX_EVENT_ARG_56 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_57 on VPX_EVENT_ARG_57 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_58 on VPX_EVENT_ARG_58 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_59 on VPX_EVENT_ARG_59 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_60 on VPX_EVENT_ARG_60 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_61 on VPX_EVENT_ARG_61 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_62 on VPX_EVENT_ARG_62 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_63 on VPX_EVENT_ARG_63 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_64 on VPX_EVENT_ARG_64 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_65 on VPX_EVENT_ARG_65 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_66 on VPX_EVENT_ARG_66 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_67 on VPX_EVENT_ARG_67 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_68 on VPX_EVENT_ARG_68 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_69 on VPX_EVENT_ARG_69 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_70 on VPX_EVENT_ARG_70 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_71 on VPX_EVENT_ARG_71 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_72 on VPX_EVENT_ARG_72 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_73 on VPX_EVENT_ARG_73 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_74 on VPX_EVENT_ARG_74 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_75 on VPX_EVENT_ARG_75 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_76 on VPX_EVENT_ARG_76 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_77 on VPX_EVENT_ARG_77 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_78 on VPX_EVENT_ARG_78 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_79 on VPX_EVENT_ARG_79 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_80 on VPX_EVENT_ARG_80 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_81 on VPX_EVENT_ARG_81 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_82 on VPX_EVENT_ARG_82 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_83 on VPX_EVENT_ARG_83 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_84 on VPX_EVENT_ARG_84 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_85 on VPX_EVENT_ARG_85 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_86 on VPX_EVENT_ARG_86 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_87 on VPX_EVENT_ARG_87 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_88 on VPX_EVENT_ARG_88 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_89 on VPX_EVENT_ARG_89 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_90 on VPX_EVENT_ARG_90 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_91 on VPX_EVENT_ARG_91 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;
CREATE INDEX VPX_EVENT_ARG_F3_92 on VPX_EVENT_ARG_92 (SCHEDULEDTASK_ID) WHERE SCHEDULEDTASK_ID IS NOT NULL;


/*==============================================================*/
/* Table: VPX_EVENT_PARTITION_LOOKUP                            */
/*==============================================================*/
CREATE TABLE VPX_EVENT_PARTITION_LOOKUP (
    START_DATE DATE NOT NULL,
    PARTITION_INDEX INTEGER NOT NULL,
    constraint PK_VPX_EVENT_PARTITION_LOOKUP primary key (START_DATE)
    );

/*==============================================================*/
/* End VPX_EVENT partition                                      */
/*==============================================================*/



--Reset tablespace back to default
RESET default_tablespace;

/*==============================================================*/
/* Table: VPX_FIELD_DEF                                         */
/*==============================================================*/
create table VPX_FIELD_DEF  (
   ID                   INTEGER                         not null,
   NAME                 VARCHAR(255),
   MO_TYPE_NAME         VARCHAR(255),
   CREATE_DEF_PRIV      VARCHAR(255),
   DELETE_DEF_PRIV      VARCHAR(255),
   READ_DEF_PRIV        VARCHAR(255),
   UPDATE_DEF_PRIV      VARCHAR(255),
   CREATE_VAL_PRIV      VARCHAR(255),
   DELETE_VAL_PRIV      VARCHAR(255),
   READ_VAL_PRIV        VARCHAR(255),
   UPDATE_VAL_PRIV      VARCHAR(255),
   constraint PK_VPX_FIELD_DEF primary key (ID)
);

/*==============================================================*/
/* Table: VPX_LOCK                                              */
/*==============================================================*/
create table VPX_LOCK  (
   ID                   INTEGER
);

/*==============================================================*/
/* Table: SESSIONLOCK                                           */
/* No VPX prefix so this won't get nuked.                       */
/* XXX - need to create this someplace else                     */
/*==============================================================*/

/*==============================================================*/
/* Table: VPX_ROLE                                              */
/*==============================================================*/
create table VPX_ROLE  (
   ID                   INTEGER                         not null,
   NAME                 VARCHAR(255),
   constraint PK_VPX_ROLE primary key (ID)
);

/*==============================================================*/
/* Table: VPX_SAMPLE                                            */
/*==============================================================*/
create table VPX_SAMPLE  (
   ID                   INTEGER                         not null,
   SAMPLE_TIME          TIMESTAMP                            not null,
   SAMPLE_INTERVAL      INTEGER,
   constraint PK_VPX_SAMPLE primary key (ID)
);

/*==============================================================*/
/* Index: VPX_SAMPLE_UNIQUE_KEY                                 */
/*==============================================================*/
create unique index VPXI_SAMPLE_UNIQUE_KEY on VPX_SAMPLE (
   SAMPLE_TIME ,
   SAMPLE_INTERVAL
);

/*==============================================================*/
/* Index: VPXI_SAMPLE_SAMPLE_TIME                               */
/*==============================================================*/
create index VPXI_SAMPLE_SAMPLE_TIME on VPX_SAMPLE (
   SAMPLE_TIME
);

/*==============================================================*/
/* Table: VPX_SCHEDULEDTASK                                     */
/*==============================================================*/
create table VPX_SCHEDULEDTASK  (
   SCHEDULEDTASK_ID     BIGINT                          not null,
   NAME                 VARCHAR(255),
   DESCRIPTION          VARCHAR(255),
   ENABLED              INTEGER,
   NOTIFICATION         VARCHAR(255),
   ENTITY_ID            BIGINT,
   ENTITY_TYPE          INTEGER,
   OBJECT_MOID          VARCHAR(255),
   LASTMODIFIEDTIME     TIMESTAMP,
   LASTMODIFIEDUSER     VARCHAR(255),
   NEXTRUNTIME          TIMESTAMP,
   PREVRUNTIME          TIMESTAMP,
   COMPLETE_STATE       VARCHAR(255),
   ERROR_DATA           TEXT,
   RESULT_DATA          TEXT,
   TASK_ID              BIGINT,
   constraint PK_VPX_SCHEDULEDTASK primary key (SCHEDULEDTASK_ID),
   constraint FK_VPX_SCHED_REF_ENTITY foreign key (ENTITY_TYPE)
      references VPX_OBJECT_TYPE (ID)
);

/*==============================================================*/
/* Table: VPX_SCHED_SCHEDULER                                   */
/*==============================================================*/
create table VPX_SCHED_SCHEDULER (
   SCHEDULEDTASK_ID     BIGINT                          not null,
   SCHEDULER_TYPE       VARCHAR(255),
   ACTIVE_TIME          TIMESTAMP,
   EXPIRE_TIME          TIMESTAMP,
   RUN_AT               TIMESTAMP,
   INTERVAL             INTEGER,
   SCHEDULE_MINUTE      INTEGER,
   SCHEDULE_HOUR        INTEGER,
   SCHEDULE_DAY         INTEGER,
   SCHEDULE_SUNDAY      INTEGER,
   SCHEDULE_MONDAY      INTEGER,
   SCHEDULE_TUESDAY     INTEGER,
   SCHEDULE_WEDNESDAY   INTEGER,
   SCHEDULE_THURSDAY    INTEGER,
   SCHEDULE_FRIDAY      INTEGER,
   SCHEDULE_SATURDAY    INTEGER,
   constraint PK_VPX_SCHED_SCHEDULER primary key (SCHEDULEDTASK_ID),
   constraint FK_VPX_SCHED_XDL_REF_SCHED foreign key (SCHEDULEDTASK_ID)
      references VPX_SCHEDULEDTASK (SCHEDULEDTASK_ID)
);


/*==============================================================*/
/* Table: VPX_SCHED_ACTION                                      */
/*==============================================================*/
create table VPX_SCHED_ACTION (
   SCHEDULEDTASK_ID     BIGINT                          not null,
   ACTION_TYPE          VARCHAR(255),
   ACTION_DATA          TEXT,
   constraint PK_VPX_SCHED_ACTION primary key (SCHEDULEDTASK_ID),
   constraint FK_VPX_SCHED_ACT_REF_SCHED foreign key (SCHEDULEDTASK_ID)
      references VPX_SCHEDULEDTASK (SCHEDULEDTASK_ID)
);


/*==============================================================*/
/* Table: VPX_SEQUENCE                                          */
/*==============================================================*/
create table VPX_SEQUENCE  (
   NAME                 VARCHAR(30)                    not null,
   ID                   BIGINT,
   constraint PK_VPX_SEQUENCE primary key (NAME)
);

/*==============================================================*/
/* Table: VPX_PARAMETER                                         */
/*==============================================================*/
create table VPX_PARAMETER  (
   NAME                 VARCHAR(255)                   not null,
   VALUE                TEXT,
   constraint PK_VPX_PARAMETER primary key (NAME)
);

/*==============================================================*/
/* Table: VPX_STAT_DEF                                          */
/*==============================================================*/
create table VPX_STAT_DEF  (
   ID                   INTEGER                         not null,
   ROLLUP_TYPE          INTEGER                         not null,
   NAME                 VARCHAR(30)                    not null,
   GROUP_NAME           VARCHAR(30)                    not null,
   TYPE                 INTEGER                         not null,
   UNIT                 VARCHAR(30),
   ASSOCIATE_IDS        VARCHAR(128),
   STAT_LEVEL           NUMERIC(2),
   PERDEVICE_STAT_LEVEL NUMERIC(2),
   DEFAULT_LEVEL_SET    NUMERIC(1) default 1            not null,
   FIXED_COLLECTION_INTERVAL INTEGER,
   constraint PK_VPX_STAT_DEF primary key (ID)
);

/*==============================================================*/
/* Table: VPX_STAT_ID                                            */
/*==============================================================*/
create table VPX_STAT_ID (
   ID                   INTEGER                 not null,
   MOID                 VARCHAR(255)           not null,
   constraint PK_VPX_STAT_ID primary key  (ID)
)
;

--SET tablespace back to vcseat
SELECT PREFTABLESPACE('task');

/*==============================================================*/
/* Table: VPX_TASK                                              */
/*==============================================================*/
create table VPX_TASK  (
   TASK_ID              BIGINT               not null,
   NAME                 VARCHAR(255),
   DESCRIPTIONID        VARCHAR(255),
   ENTITY_ID            BIGINT,
   ENTITY_TYPE          INTEGER,
   ENTITY_NAME          VARCHAR(255),
   LOCKED_DATA          TEXT,
   COMPLETE_STATE       VARCHAR(255),
   CANCELLED            INTEGER,
   CANCELLABLE          INTEGER,
   ERROR_DATA           TEXT,
   RESULT_DATA          TEXT,
   PROGRESS             INTEGER,
   REASON_DATA          TEXT,
   QUEUE_TIME           TIMESTAMP,
   START_TIME           TIMESTAMP,
   COMPLETE_TIME        TIMESTAMP,
   EVENT_CHAIN_ID       INTEGER,
   USERNAME             VARCHAR(255),
   VM_ID                BIGINT,
   HOST_ID              BIGINT,
   COMPUTERESOURCE_ID   BIGINT,
   DATACENTER_ID        BIGINT,
   RESOURCEPOOL_ID      BIGINT,
   FOLDER_ID            BIGINT,
   ALARM_ID             BIGINT,
   SCHEDULEDTASK_ID     BIGINT,
   CHANGE_TAG_ID        INTEGER,
   PARENT_TASK_ID       BIGINT,
   ROOT_TASK_ID         BIGINT,
   DESCRIPTION          TEXT,
   ACTIVATION_ID        VARCHAR(255),
   constraint PK_VPX_TASK primary key  (TASK_ID),
   constraint FK_VPX_TASK_REF_ENTITY foreign key (ENTITY_TYPE)
      references VPX_OBJECT_TYPE (ID),
   constraint FK_VPX_TASK_CHANGE_TAG foreign key (CHANGE_TAG_ID)
      references VPX_CHANGE_TAG (CHANGE_TAG_ID) on delete SET NULL,
   constraint FK_PARENT_TASK_REF foreign key (PARENT_TASK_ID)
      references VPX_TASK (TASK_ID)
);

/*==============================================================*/
/* Index: VPXI_TASK_ALARM_ID                                    */
/*==============================================================*/
create index VPXI_TASK_ALARM_ID on VPX_TASK (
   ALARM_ID
) WHERE ALARM_ID IS NOT NULL;

/*==============================================================*/
/* Index: VPXI_TASK_COMPLETE_STATE                              */
/*==============================================================*/
create index VPXI_TASK_COMPLETE_STATE on VPX_TASK (
   COMPLETE_STATE
);

/*==============================================================*/
/* Index: VPXI_TASK_COMPLETE_TIME                               */
/*==============================================================*/
create index VPXI_TASK_COMPLETE_TIME on VPX_TASK (
   COMPLETE_TIME
);

/*==============================================================*/
/* Index: VPXI_TASK_COMPUTERESOURCE_ID                          */
/*==============================================================*/
create index VPXI_TASK_COMPUTERESOURCE_ID on VPX_TASK (
   COMPUTERESOURCE_ID
);

/*==============================================================*/
/* Index: VPXI_TASK_DATACENTER_ID                               */
/*==============================================================*/
create index VPXI_TASK_DATACENTER_ID on VPX_TASK (
   DATACENTER_ID
);

/*==============================================================*/
/* Index: VPXI_TASK_ENTITY_ID                                   */
/*==============================================================*/
create index VPXI_TASK_ENTITY_ID on VPX_TASK (
   ENTITY_ID
);

/*==============================================================*/
/* Index: VPXI_TASK_HOST_ID                                     */
/*==============================================================*/
create index VPXI_TASK_HOST_ID on VPX_TASK (
   HOST_ID
);

/*==============================================================*/
/* Index: VPXI_TASK_RESOURCEPOOL_ID                             */
/*==============================================================*/
create   index VPXI_TASK_RESOURCEPOOL_ID on VPX_TASK (
RESOURCEPOOL_ID
) WHERE RESOURCEPOOL_ID IS NOT NULL
;

/*==============================================================*/
/* Index: VPXI_TASK_FOLDER_ID                                   */
/*==============================================================*/
create   index VPXI_TASK_FOLDER_ID on VPX_TASK (
FOLDER_ID
) WHERE FOLDER_ID IS NOT NULL
;

/*==============================================================*/
/* Index: VPXI_TASK_QUEUE_TIME                                  */
/*==============================================================*/
create index VPXI_TASK_QUEUE_TIME on VPX_TASK (
   QUEUE_TIME
);

/*==============================================================*/
/* Index: VPXI_TASK_SCHEDULEDTASK_ID                            */
/*==============================================================*/
create index VPXI_TASK_SCHEDULEDTASK_ID on VPX_TASK (
   SCHEDULEDTASK_ID
) WHERE SCHEDULEDTASK_ID IS NOT NULL;

/*==============================================================*/
/* Index: VPXI_TASK_START_TIME                                  */
/*==============================================================*/
create index VPXI_TASK_START_TIME on VPX_TASK (
   START_TIME
);

/*==============================================================*/
/* Index: VPXI_TASK_USERNAME                                    */
/*==============================================================*/
create index VPXI_TASK_USERNAME on VPX_TASK (
   USERNAME
);

/*==============================================================*/
/* Index: VPXI_TASK_VM_ID                                       */
/*==============================================================*/
create index VPXI_TASK_VM_ID on VPX_TASK (
   VM_ID
);

/*==============================================================*/
/* Index: VPXI_CHANGE_TAG_ID                                    */
/*==============================================================*/
create index VPXI_CHANGE_TAG_ID on VPX_TASK (
   CHANGE_TAG_ID
);

/*==============================================================*/
/* Index: VPXI_PARENT_TASK_ID                                   */
/*==============================================================*/
create index VPXI_PARENT_TASK_ID  on VPX_TASK (
   PARENT_TASK_ID
);

/*==============================================================*/
/* Index: VPXI_ROOT_TASK_ID                                     */
/*==============================================================*/
create index VPXI_ROOT_TASK_ID on VPX_TASK (
   ROOT_TASK_ID
);

/*
 * Aggressive autovacuum for VPX_TASK to reduce fragmentation caused by huge
 * amount of updates.
 */
ALTER TABLE VPX_TASK SET (autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_TASK SET (toast.autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_TASK SET (autovacuum_analyze_scale_factor = 0.05);
ALTER TABLE VPX_TASK SET (autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_TASK SET (toast.autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_TASK SET (autovacuum_analyze_threshold = 25);
ALTER TABLE VPX_TASK SET (autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_TASK SET (toast.autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_TASK SET (autovacuum_vacuum_cost_limit = 1000);
ALTER TABLE VPX_TASK SET (toast.autovacuum_vacuum_cost_limit = 1000);

--Reset tablespace back to default
RESET default_tablespace;

/*==============================================================*/
/* Table: VPX_VERSION                                           */
/*==============================================================*/
create table VPX_VERSION  (
   VER_ID               INTEGER                         not null,
   VERSION_VALUE        VARCHAR(30),
   constraint PK_VPX_VERSION primary key (VER_ID)
);

/*==============================================================*/
/* Table: VPX_PRIV_ROLE                                         */
/*==============================================================*/
create table VPX_PRIV_ROLE  (
   PRIV_NAME            VARCHAR(255)                   not null,
   ROLE_ID              INTEGER                        not null,
   SURR_KEY				   SERIAL,
   constraint PK_VPX_PRIV_ROLE	primary key (ROLE_ID,SURR_KEY),
   constraint FK_VPX_PRIV_REF_VPX_ROLE foreign key (ROLE_ID)
         references VPX_ROLE (ID)
);

/*==============================================================*/
/* Table: VPX_ENTITY                                            */
/*==============================================================*/
create table VPX_ENTITY  (
   ID                   BIGINT                         not null,
   NAME                 VARCHAR(255)                   not null,
   TYPE_ID              INTEGER                         not null,
   PARENT_ID            BIGINT,
   constraint PK_VPX_ENTITY primary key (ID),
   constraint FK_VPX_ENTI_REF_VPX_ENTI foreign key (PARENT_ID)
         references VPX_ENTITY (ID),
   constraint FK_VPX_ENT_REF_VPX_ENT_TYPE foreign key (TYPE_ID)
         references VPX_OBJECT_TYPE (ID)
);

/*
 * Aggressive autovacuum for VPX_ENTITY to reduce fragmentation caused by huge
 * amount of updates.
 */
ALTER TABLE VPX_ENTITY SET (autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_ENTITY SET (toast.autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_ENTITY SET (autovacuum_analyze_scale_factor = 0.05);
ALTER TABLE VPX_ENTITY SET (autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_ENTITY SET (toast.autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_ENTITY SET (autovacuum_analyze_threshold = 25);
ALTER TABLE VPX_ENTITY SET (autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_ENTITY SET (toast.autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_ENTITY SET (autovacuum_vacuum_cost_limit = 1000);
ALTER TABLE VPX_ENTITY SET (toast.autovacuum_vacuum_cost_limit = 1000);

SELECT PREFTABLESPACE('alarm');

/*==============================================================*/
/* Table: VPX_ALARM_DISABLED_ACTIONS                            */
/*==============================================================*/
create table VPX_ALARM_DISABLED_ACTIONS (
   ENTITY_ID            BIGINT                   not null,
   ENTITY_TYPE          INTEGER                  not null,
   constraint PK_VPX_ALARM_DISABLED_ACTIONS primary key (ENTITY_ID),
   constraint FK_VPX_ALARM_DIS_REF_ENTITY foreign key (ENTITY_ID)
      references VPX_ENTITY (ID) on delete cascade
);

--Reset tablespace back to default
RESET default_tablespace;

/*==============================================================*/
/* Index: VPXI_ENTITY_TYPE_ID                                   */
/*==============================================================*/
create index VPXI_ENTITY_TYPE_ID on VPX_ENTITY (
   TYPE_ID
);

/*==============================================================*/
/* Table: VPX_ACCESS                                            */
/*==============================================================*/
create table VPX_ACCESS  (
   ID                   INTEGER                         not null,
   PRINCIPAL            VARCHAR(300)                   not null,
   ROLE_ID              INTEGER                         not null,
   ENTITY_ID            BIGINT                          not null,
   FLAG                 INTEGER                         not null,
   SURR_KEY				SERIAL,
   constraint PK_VPX_ACCESS primary key (ENTITY_ID,SURR_KEY),
   constraint FK_VPX_ACCE_REF_VPX_ENTI foreign key (ENTITY_ID)
         references VPX_ENTITY (ID) on delete cascade
);

/*==============================================================*/
/* Table: VPX_CONFIG_ISSUE                                      */
/*==============================================================*/
create table VPX_CONFIG_ISSUE (
   ENTITY_ID            BIGINT                   not null,
   EVENT_ID             INTEGER                   not null,
   CFG_ISSUE_TYPE       INTEGER                  not null,
   constraint PK_VPX_CONFIG_ISSUE primary key  (ENTITY_ID, CFG_ISSUE_TYPE),
   constraint FK_VPX_CFGISS_VPX_VM foreign key (ENTITY_ID)
      references VPX_ENTITY (ID)
         on delete cascade
);

/*==============================================================*/
/* Table: VPX_SNAPSHOT                                          */
/*==============================================================*/
create table VPX_SNAPSHOT  (
   ID                   BIGINT                         not null,
   HOST_SNAPSHOT_ID     VARCHAR(500)                   not null,
   VM_ID                BIGINT                          not null,
   SNAPSHOT_NAME        VARCHAR(255) ,
   SNAPSHOT_DESC        TEXT,
   CREATE_TIME          TIMESTAMP                            null,
   POWER_STATE          INTEGER                         not null,
   IS_QUIESCED          INTEGER                         null,
   SNAPSHOT_UID         INTEGER         default -1 not null,
   PARENT_SNAPSHOT_ID   BIGINT                          not null,
   IS_CURRENT_SNAPSHOT  INTEGER                         not null,
   CONFIG               TEXT,
   constraint PK_VPX_SNAPSHOT primary key (ID),
   constraint FK_VPX_SNAPSHOT_REF_VPX_VM foreign key (VM_ID)
         references VPX_ENTITY (ID)
         on delete cascade
);

/*==============================================================*/
/* Table: VPX_FIELD_VAL                                         */
/*==============================================================*/
create table VPX_FIELD_VAL  (
   FIELD_ID             INTEGER                         not null,
   ENTITY_ID            BIGINT,
   VALUE                TEXT,
   MO_ID                VARCHAR(255)                   not null,
   constraint PK_VPX_FIELD_VAL primary key (FIELD_ID, MO_ID),
   constraint FK_VPX_F_VAL_REF_F_DEF foreign key (FIELD_ID)
         references VPX_FIELD_DEF (ID)
            on delete cascade
);

/*==============================================================*/
/* Table: VPX_DATACENTER                                        */
/*==============================================================*/
create table VPX_DATACENTER (
   ID                   BIGINT               not null,
   DEFAULT_HW_VERSION   VARCHAR(255),
   constraint PK_VPX_DATACENTER primary key  (ID),
   constraint FK_VPX_DC_REF_VPX_ENTITY foreign key (ID)
      references VPX_ENTITY (ID)
      on delete cascade
)
;

/*==============================================================*/
/* Table: VPX_VM                                                */
/*==============================================================*/
create table VPX_VM  (
   ID                   BIGINT                          not null,
   DATACENTER_ID        BIGINT                          not null,
   FILE_NAME            VARCHAR(440),
   LOCAL_FILE_NAME      VARCHAR(255),
   POWER_STATE          INTEGER                         not null,
   DISABLED_SNAPSHOT    INTEGER   default 0             not null,
   FAILED_DMOTION       NUMERIC(1) default 0            not null,
   UUID_BIOS            VARCHAR(255),
   RESOURCE_GROUP_ID    BIGINT,
   GUEST_OS             VARCHAR(255),
   GUEST_FAMILY         VARCHAR(255),
   GUEST_STATE          VARCHAR(255),
   MEM_SIZE_MB          INTEGER,
   MEMORY_RESERVATION   INTEGER,
   PMEM_RESERVATION     INTEGER,
   CPU_RESERVATION      INTEGER,
   NUM_VCPU             INTEGER,
   NUM_NIC              INTEGER,
   NUM_DISK             INTEGER,
   DNS_NAME             VARCHAR(255),
   IS_TEMPLATE          INTEGER                         not null,
   HOST_ID              BIGINT                          not null,
   IP_ADDRESS           VARCHAR(50),
   TOOLS_STATUS         INTEGER,
   TOOLS_VERSION_STATUS VARCHAR(255),
   TOOLS_RUNNING_STATUS VARCHAR(255),
   TOOLS_VERSION        VARCHAR(255),
   GUEST_OPS_READY      NUMERIC(1),
   INT_GUEST_OPS_READY  NUMERIC(1),
   SCREEN_WIDTH         INTEGER,
   SCREEN_HEIGHT        INTEGER,
   AGENT_ID             INTEGER                         not null,
   AGENT_CNX_STATE      INTEGER                         not null,
   CONFIG               TEXT,
   CAPABILITY           TEXT,
   SUSPEND_TIME         TIMESTAMP,
   BOOT_TIME            TIMESTAMP,
   SUSPEND_INTERVAL     VARCHAR(21),
   QUESTION_INFO        TEXT,
   MEMORY_OVERHEAD      VARCHAR(21),
   TOOLS_MOUNTED        INTEGER,
   MKS_CONNECTIONS      INTEGER,
   ONLINE_STANDBY       NUMERIC(1) default 0           not null,
   ANNOTATION           VARCHAR(2000),
   PENDING_NAME         VARCHAR(255),
   PENDING_ANNOTATION   VARCHAR(2000),
   PENDING_ANNOT_SET_FLG NUMERIC(1)   DEFAULT 0 NOT NULL,
   FILE_LAYOUT          TEXT,
   FILE_LAYOUT_X        TEXT                 null,
   UUID_INSTANCE        VARCHAR(255),
   VAPP_CONFIG          TEXT                           null,    /* VOE */
   AGGR_COMMITED_STORAGE_SPACE     NUMERIC(38),
   AGGR_UNCOMMITED_STORAGE_SPACE   NUMERIC(38),
   AGGR_UNSHARED_STORAGE_SPACE     NUMERIC(38),
   STORAGE_SPACE_UPDATED_TIME      TIMESTAMP,
   FAULT_TOLERANCE_STATE        int,
   RECORD_REPLAY_STATE          int,
   DEV_RUNTIME          TEXT                           null,
   GUEST_IP_STACK       TEXT                           null,
   MANAGED_BY_EXT_KEY   VARCHAR(255)                   null,
   MANAGED_BY_TYPE      VARCHAR(255)                   null,
   ESX_AGENT_VM_STATE   int                            null,
   DAS_PROTECTED_DESIRED int         null,
   DAS_PROTECTED_ACTUAL  int         null,
   IS_CONSOLIDATE_NEEDED NUMERIC(1)  default 0  not null,
   OFFLINE_FEATURE_REQUIREMENT  TEXT,
   FEATURE_REQUIREMENT          TEXT,
   FEATURE_MASK                 TEXT,
   GENERATION_INFO      TEXT                           null,
   PAUSED                       NUMERIC(1),
   SNAPSHOT_IN_BACKGROUND       NUMERIC(1),
   GUEST_STATE_CHANGE_SUPPORTED NUMERIC(1),
   IS_QUIESCED_FORK_PARENT      NUMERIC(1),
   INSTANT_CLONE_FROZEN         NUMERIC(1),
   CREATE_DATE                  TIMESTAMP,
   VVTD_ENABLED                 NUMERIC(1),
   VBS_ENABLED                  NUMERIC(1),
   TPM_PRESENT                  NUMERIC(1),
   NUM_VMIOP_BACKINGS           INTEGER,
   CRYPTO_STATE                 VARCHAR(128)           null,
   constraint PK_VPX_VM primary key (ID),
   constraint FK_VPX_VM_REF_VPX_ENTI foreign key (ID)
         references VPX_ENTITY (ID) on delete cascade
);

/* Aggressive autovacuum for VPX_VM to handle huge amount of updates. */
ALTER TABLE VPX_VM SET (autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_VM SET (toast.autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_VM SET (autovacuum_analyze_scale_factor = 0.05);
ALTER TABLE VPX_VM SET (autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_VM SET (toast.autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_VM SET (autovacuum_analyze_threshold = 25);
ALTER TABLE VPX_VM SET (autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_VM SET (toast.autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_VM SET (autovacuum_vacuum_cost_limit = 1000);
ALTER TABLE VPX_VM SET (toast.autovacuum_vacuum_cost_limit = 1000);

CREATE INDEX VPXI_VM_DISABLED_SNAPSHOT ON VPX_VM(DISABLED_SNAPSHOT);

/*==============================================================*/
/* Index: IX_VPX_VM_DCID_ISTMPLT_UUIDINS                        */
/*==============================================================*/
CREATE INDEX IX_VPX_VM_DCID_ISTMPLT_UUIDINS ON VPX_VM (DATACENTER_ID, IS_TEMPLATE, UUID_INSTANCE)
;

/*==============================================================*/
/* Table: VPX_OVFENV                                            */
/*==============================================================*/
create table VPX_OVFENV (
   ID                   BIGINT               not null,
   PUBLIC_OVFENV        TEXT                 null,
   PRIVATE_OVFENV       TEXT                 null,
   constraint PK_VPX_OVFENV primary key (ID),
   constraint FK_VPX_OVFENV_REF_VPX_ENTITY foreign key (ID)
      references VPX_ENTITY (ID)
         on delete cascade
);

/*==============================================================*/
/* Table: VPX_WWN                                               */
/*==============================================================*/
create table VPX_WWN (
   ENTITY_ID            BIGINT               not null,
   NODE_WWN             VARCHAR(21),
   PORT_WWN             VARCHAR(21),
   IS_VM_NPIV           INTEGER              not null,
   SURR_KEY				   SERIAL,
   constraint PK_VPX_WWN primary key (ENTITY_ID, SURR_KEY),
   constraint FK_VPX_VW_REF_VPX_ENTITY foreign key (ENTITY_ID)
      references VPX_ENTITY (ID)
         on delete cascade
)
;

/*==============================================================*/
/* Table: VPX_MAC_XVC_VMOTION                                   */
/*==============================================================*/
create table VPX_MAC_XVC_VMOTION (
   MAC_ADDRESS          VARCHAR(20)      not null,
   constraint PK_VPX_MAC_XVC_VMOTION primary key (MAC_ADDRESS)
);

/*==============================================================*/
/* Table: VPX_JOURNAL                                           */
/*==============================================================*/
create table VPX_JOURNAL (
   ID                   BIGINT               not null,
   TYPE                 INTEGER              not null,
   constraint PK_VPX_JOURNAL primary key (ID)
);

/*==============================================================*/
/* Table: VPX_JOURNAL_ENTRY                                     */
/*==============================================================*/
create table VPX_JOURNAL_ENTRY (
   JOURNAL_ID           BIGINT               not null,
   ENTRY_ID             INTEGER              not null,
   ENTRY_NAME           VARCHAR(255),
   ENTRY_VALUE          TEXT,
   constraint PK_VPX_JOURNAL_ENTRY primary key (JOURNAL_ID, ENTRY_ID),
   constraint FK_VPX_JOURNAL_REF foreign key (JOURNAL_ID)
      references VPX_JOURNAL (ID)
         on delete cascade
);

/*
 * Aggressive autovacuum for VPX_JOURNAL_ENTRY to reduce fragmentation.
 */
ALTER TABLE VPX_JOURNAL_ENTRY SET (autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_JOURNAL_ENTRY SET (toast.autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_JOURNAL_ENTRY SET (autovacuum_analyze_scale_factor = 0.05);
ALTER TABLE VPX_JOURNAL_ENTRY SET (autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_JOURNAL_ENTRY SET (toast.autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_JOURNAL_ENTRY SET (autovacuum_analyze_threshold = 25);
ALTER TABLE VPX_JOURNAL_ENTRY SET (autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_JOURNAL_ENTRY SET (toast.autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_JOURNAL_ENTRY SET (autovacuum_vacuum_cost_limit = 1000);
ALTER TABLE VPX_JOURNAL_ENTRY SET (toast.autovacuum_vacuum_cost_limit = 1000);

/*==============================================================*/
/* Index: VPXI_VM_FILE_NAME                                     */
/*==============================================================*/
create index VPXI_VM_FILE_NAME on VPX_VM (
   FILE_NAME
);

/*==============================================================*/
/* Index: VPXI_VM_UUID_BIOS                                     */
/*==============================================================*/
create index VPXI_VM_UUID_BIOS on VPX_VM (
   UUID_BIOS
);

/*==============================================================*/
/* Index: VPXI_VM_UUID_INSTANCE                                     */
/*==============================================================*/
create index VPXI_VM_UUID_INSTANCE on VPX_VM (
   UUID_INSTANCE
);

/*==============================================================*/
/* Index: VPXI_VM_DATACENTER_ID                                 */
/*==============================================================*/
create index VPXI_VM_DATACENTER_ID on VPX_VM (
   DATACENTER_ID
);

/*==============================================================*/
/* Index: VPXI_VM_DNS_NAME                                      */
/*==============================================================*/
create index VPXI_VM_DNS_NAME on VPX_VM (
   DNS_NAME
);

/*==============================================================*/
/* Index: VPXI_VM_IP_ADDRESS                                    */
/*==============================================================*/
create index VPXI_VM_IP_ADDRESS on VPX_VM (
   IP_ADDRESS
);

/*==============================================================*/
/* Index: VPXI_VM_RESOURCE_GROUP_ID                             */
/*==============================================================*/
create index VPXI_VM_RESOURCE_GROUP_ID on VPX_VM (
   RESOURCE_GROUP_ID
);

/*==============================================================*/
/* Index: VPX_VM_F1            					*/
/*==============================================================*/
create index VPX_VM_F1 on VPX_VM (
   HOST_ID
);

/*==============================================================*/
/* Table: VPX_VM_STATIC_OVERHEAD_MAP                            */
/*==============================================================*/
create table VPX_VM_STATIC_OVERHEAD_MAP (
   VM_ID               BIGINT              NOT  NULL,
   HOST_BUILD_NUM      VARCHAR(20)         NOT  NULL,
   STATIC_MEM_OVERHEAD  VARCHAR(21)        NOT  NULL,
   constraint PK_VPX_VM_STATIC_OVERHEAD_MAP primary key (VM_ID,HOST_BUILD_NUM),
   constraint FK_VPX_VM_STATIC_OVHD_MAP_REF foreign key (VM_ID)
         references VPX_VM (ID) on delete cascade
)
;

/*==============================================================*/
/* Table: VPX_COMPUTE_RESOURCE                                  */
/*==============================================================*/
create table VPX_COMPUTE_RESOURCE  (
   ID                   BIGINT                          not null,
   RESOURCE_GROUP_ID    BIGINT,
   RESOURCE_TYPE        INTEGER                         not null,
   SUMMARY              TEXT,
   VM_SWAP_PLACEMENT    INTEGER           default 1     not null,
   SPBM_ENABLED         INTEGER,
   DAS_ENABLED          INTEGER,
   FAILOVER_LEVEL       INTEGER,
   STRICT_ADMISSION_CONTROL INTEGER,
   DAS_OPTIONS          TEXT,
   DRS_ENABLED          INTEGER,
   DEFAULT_VM_BEHAVIOR  INTEGER,
   VMOTION_RATE         INTEGER,
   DRS_OPTIONS          TEXT,
   RULES_INFO           TEXT,
   DPM_ENABLED_FLG       NUMERIC(1)           null,
   DEFAULT_HOST_BEHAVIOR NUMERIC(1)          null,
   DEFAULT_DAS_PRIORITY  NUMERIC(1)         NULL,
   POWER_OFF_ON_ISOLATION NUMERIC(1)        NULL,
   DPM_OPTIONS          TEXT      null,
   EVC_MODE             VARCHAR(30)        null,
   VMHEALTH_VM_MONITORING    INTEGER default 0 not null,
   VMHEALTH_FAILURE_INTERVAL INTEGER default 30  not null,
   VMHEALTH_MIN_UPTIME       INTEGER default 120 not null,
   VMHEALTH_MAX_FAILURES     INTEGER default 3 not null,
   VMHEALTH_MAX_FAILURE_WINDOW INTEGER default -1 not null,
   FAILOVER_CPU_RESOURCES       NUMERIC(3),
   FAILOVER_MEM_RESOURCES       NUMERIC(3),
   HOST_POWER_ACTION_RATE    int,
   DRS_VM_OVERRIDES_ENABLED_FLG NUMERIC(1) default 1 not null,
   DAS_HOST_MONITORING          NUMERIC(1) default 1,
   DAS_VM_MONITORING            INTEGER default 0,
   CLUSTER_STATE       INTEGER,
   CLUSTER_CONFIG_VERSION       NUMERIC(22),
   DAS_VM_METADATA_VERSION      NUMERIC(22),
   DAS_HOSTLIST_VERSION         NUMERIC(22),
   DAS_FAULT_DOMAIN_ID          VARCHAR(255),
   DAS_VM_COMP_PROTECTING   VARCHAR(30),
   VMCP_APD_TERMINATE       VARCHAR(30),
   VMCP_APD_TERMINATE_DELAY INTEGER,
   VMCP_APD_RESET           VARCHAR(30),
   VMCP_PDL_TERMINATE       VARCHAR(30),
   ALLOW_SYS_UPDATE_HB_DS       INTEGER,
   GROUPS_INFO			   TEXT,
   NUM_REQUIRED_AGENT_VMS       INTEGER,
   SLOT_POLICY                  TEXT,
   DEFAULT_HW_VERSION           VARCHAR(255),
   VSAN_ENABLED                 INTEGER,
   VSAN_AUTO_CLAIM_STORAGE      INTEGER,
   VSAN_UUID                    VARCHAR(36),
   VSAN_CHECKSUM_ENABLED        NUMERIC(1),
   DAS_RESTART_PRIORITY_TIMEOUT     INTEGER,
   ORC_READY_CONDITION              INTEGER,
   ORC_POST_READY_DELAY             INTEGER,
   FAILOVER_RESOURCE_REDUCTION  INTEGER,
   FAILOVER_RESOURCE_AUTO_COMPUTE INTEGER,
   PROACTIVE_DRS_ENABLED        NUMERIC(1),
   constraint PK_VPX_COMP_RES primary key (ID),
   constraint FK_VPX_CLUS_REF_VPX_ENTI foreign key (ID)
         references VPX_ENTITY (ID)
         on delete cascade,
   constraint FK_VPX_COMP_REFERENCE_VPX_ENTI foreign key (RESOURCE_GROUP_ID)
         references VPX_ENTITY (ID)
);

/*==============================================================*/
/* Table: VPX_CLUSTER_IOFILTERS                                 */
/*==============================================================*/
create table VPX_CLUSTER_IOFILTERS (
   CLUSTER_ID       BIGINT not null,
   AGENCY_REF       VARCHAR(128) not null,
   OP_TYPE          VARCHAR(128) not null,
   VIB_URL          VARCHAR(255) null,
   VIB_ID           VARCHAR(255) null,
   VIB_NAME         VARCHAR(255) null,
   VIB_VERSION      VARCHAR(255) null,
   VIB_VENDOR       VARCHAR(255) null,
   VIB_SUMMARY      VARCHAR(255) null,
   VIB_RELEASE_DATE VARCHAR(255) null,
   FILTER_CLASS     VARCHAR(128) null,
   constraint PK_VPX_CLUS_IOF primary key (CLUSTER_ID, AGENCY_REF),
   constraint FK_VPX_CLUS_IOF foreign key (CLUSTER_ID)
         references VPX_ENTITY (ID)
         on delete cascade
);

/*==============================================================*/
/* Table: VPX_DATASTORE                                         */
/*==============================================================*/
create table VPX_DATASTORE  (
   ID                   BIGINT                         not null,
   NAME                 VARCHAR(255),
   STORAGE_URL          VARCHAR(255),
   CAPACITY             VARCHAR(21),
   FREE_SPACE           VARCHAR(21),
   TYPE                 VARCHAR(128)                   not null,
   INFO                 TEXT,
   CAPABILITY           TEXT,
   DATACENTER_ID        BIGINT                         not null,
   IORM_ENABLED         NUMERIC(1) default 0,
   IORM_CONGESTION_THRESHOLD INTEGER,
   MAINTENANCE_MODE     INTEGER default 0 not null,
   THIN_PROV_SPACE_FLAG NUMERIC(1) default 0 not null,
   IORM_CONGESTION_THRESH_MODE            VARCHAR(255),
   IORM_PERCENT_OF_PEAK_THRP   INTEGER,
   IORM_STATS_ENABLED NUMERIC(1) default 0,
   IORM_STATS_AGGR_DISABLED NUMERIC(1) default 0,
   constraint PK_VPX_DATASTORE primary key (ID),
   constraint FK_VPX_DS_REF_VPX_ENTITY foreign key (ID)
         references VPX_ENTITY (ID)
         on delete cascade,
   constraint FK_VPX_DS_DC_REF_VPX_ENT foreign key (DATACENTER_ID)
         references VPX_ENTITY (ID)
);

/*==============================================================*/
/* Index: VPXI_DATASTORE_DATACENTER                             */
/*==============================================================*/
create   index VPXI_DATASTORE_DATACENTER on VPX_DATASTORE (
   DATACENTER_ID
)
;

/*==============================================================*/
/* Table: VPX_NETWORK                                           */
/*==============================================================*/
create table VPX_NETWORK  (
   ID                   BIGINT                          not null,
   NAME                 VARCHAR(128),
   DATACENTER_ID        BIGINT                         not null,
   OPAQUE_ID            VARCHAR(128),
   OPAQUE_TYPE          VARCHAR(128),
   OPAQUE_CAPABILITY    TEXT                            null,
   OPAQUE_EXTRA_CONFIG  TEXT                            null,
   constraint PK_VPX_NETWORK primary key (ID),
   constraint FK_VPX_NET_REF_VPX_ENTI foreign key (ID)
         references VPX_ENTITY (ID)
         on delete cascade,
   constraint FK_VPX_NET_REF_VPX_DATA foreign key (DATACENTER_ID)
         references VPX_ENTITY (ID)
);

/*==============================================================*/
/* Index: VPXI_NETWORK_DATACENTER                             */
/*==============================================================*/
create   index VPXI_NETWORK_DATACENTER on VPX_NETWORK (
   DATACENTER_ID
)
;

/*==============================================================*/
/* Table: VPX_IP_POOL                                           */
/*==============================================================*/
create table VPX_IP_POOL ( /* VOE */
   ID                   INTEGER                not null,
   DATACENTER_ID        BIGINT                 not null,
   NAME                 VARCHAR(255)         not null,
   IPV4_SUBNET          VARCHAR(16)          null,
   IPV4_NETMASK         VARCHAR(16)          null,
   IPV4_GATEWAY         VARCHAR(16)          null,
   IPV4_RANGE           VARCHAR(128)         null,
   IPV4_DNS             VARCHAR(128)         null,
   IPV4_ENABLED         NUMERIC(1)    default 0 not null,
   IPV4_DHCP            NUMERIC(1)    default 0 not null,
   IPV6_SUBNET          VARCHAR(128)         null,
   IPV6_NETMASK         VARCHAR(128)         null,
   IPV6_GATEWAY         VARCHAR(128)         null,
   IPV6_RANGE           VARCHAR(128)         null,
   IPV6_DNS             VARCHAR(128)         null,
   IPV6_ENABLED         NUMERIC(1)    default 0 not null,
   IPV6_DHCP            NUMERIC(1)    default 0 not null,
   DNS_DOMAIN           VARCHAR(256)         null,
   DNS_SEARCH_PATH      VARCHAR(128)         null,
   HOST_PREFIX          VARCHAR(128)         null,
   HTTP_PROXY           VARCHAR(128)         null,
   constraint PK_VPX_IPPOOL primary key  (ID),
   constraint FK_VPX_IPPOOL_REF_VPX_DATA foreign key (DATACENTER_ID)
      references VPX_ENTITY (ID)
)
;

CREATE UNIQUE INDEX VPXI_IP_POOL_UNIQUE_DC_ID ON VPX_IP_POOL(ID,DATACENTER_ID);
CREATE UNIQUE INDEX VPXI_IP_POOL_UNIQUE_DC_NAME ON VPX_IP_POOL (DATACENTER_ID, NAME);


/*==============================================================*/
/* Table: VPX_IP_POOL_ASSOCIATION                               */
/*==============================================================*/
create table VPX_IP_POOL_ASSOCIATION ( /* VOE */
   NETWORK_ID           BIGINT                    not null,
   POOL_ID              INTEGER                   not null,
   constraint PK_VPX_IPPOOL_ASSOCIATION primary key  (NETWORK_ID),
   constraint FK_VPX_IP_POOL_ASSOCIATION foreign key (POOL_ID)
      references VPX_IP_POOL (ID)
)
;


/*==============================================================*/
/* Table: VPX_IP_POOL_ALLOCATION                                */
/*==============================================================*/
create table VPX_IP_POOL_ALLOCATION ( /* VOE */
   POOL_ID              INTEGER                   not null,
   ALLOCATION_ID        VARCHAR(255)              not null,
   EXTENSION_KEY        VARCHAR(255)              not null,
   IP_ADDRESS           VARCHAR(50)               not null,
   SURR_KEY				SERIAL,
   constraint PK_VPX_IP_POOL_ALLOCATION primary key (POOL_ID, SURR_KEY),
   constraint FK_VPX_IP_POOL_ALLOCATION foreign key (POOL_ID)
      references VPX_IP_POOL (ID) on delete cascade
)
;

CREATE UNIQUE INDEX VPXI_IP_POOL_ALLOC_UNIQUE_ID ON VPX_IP_POOL_ALLOCATION (POOL_ID, ALLOCATION_ID, EXTENSION_KEY);

/* Index for sqlList.cpp "DeleteIpPoolAllocationsByExtension" */
CREATE INDEX VPXI_IP_POOL_ALLOC_EXT_KEY ON VPX_IP_POOL_ALLOCATION (EXTENSION_KEY);


/*==============================================================*/
/* Table: VPX_NW_ASSIGNMENT                                     */
/*==============================================================*/
create table VPX_NW_ASSIGNMENT  (
   NETWORK_ID           BIGINT                          not null,
   ENTITY_ID            BIGINT                          not null,
   constraint PK_VPX_NW_ASSIGNMENT primary key (NETWORK_ID, ENTITY_ID),
   constraint FK_VPX_ENTNET_REF_VPX_ENTI foreign key (ENTITY_ID)
         references VPX_ENTITY (ID) on delete cascade
);

/*==============================================================*/
/* Index: VPXI_NW_ASSIGNMENT_ENTITY                             */
/*==============================================================*/
create index VPXI_NW_ASSIGNMENT_ENTITY on VPX_NW_ASSIGNMENT (
   ENTITY_ID
);


/*==============================================================*/
/* Table: VPX_DVS                                               */
/*==============================================================*/
create table VPX_DVS (
   ID                       BIGINT               not null,
   DATACENTER_ID            BIGINT               not null,
   NAME                     VARCHAR(255)         not null,
   UUID                     VARCHAR(255)         not null,
   DESCRIPTION              VARCHAR(255)         null,
   NUM_PORT                 INTEGER               null,
   NUM_STANDALONE_PORT      INTEGER               null,
   MAX_PORT                 INTEGER               null,
   PRODUCT_NAME             VARCHAR(255)         null,
   PRODUCT_VENDOR           VARCHAR(255)         null,
   PRODUCT_VERSION          VARCHAR(255)         null,
   PRODUCT_BUILD            VARCHAR(255)         null,
   PRODUCT_BUNDLE_ID        VARCHAR(255)          null,
   PRODUCT_BUNDLE_URL       VARCHAR(255)          null,
   PRODUCT_FORWARDING_CLASS VARCHAR(255)          null,
   UPGRADE_NAME             VARCHAR(255)         null,
   UPGRADE_VENDOR           VARCHAR(255)         null,
   UPGRADE_VERSION          VARCHAR(255)         null,
   UPGRADE_BUILD            VARCHAR(255)         null,
   UPGRADE_BUNDLE_ID        VARCHAR(255)          null,
   UPGRADE_BUNDLE_URL       VARCHAR(255)          null,
   UPGRADE_FORWARDING_CLASS VARCHAR(255)          null,
   UPGRADE_STATUS           NUMERIC(1)             null,
   EXTENSION_KEY            VARCHAR(255)         null,
   OWNER                    VARCHAR(255)         null,
   CONTACT                  VARCHAR(255)         null,
   CREATE_TIME              TIMESTAMP                  null,
   IP_ADDRESS               VARCHAR(50)          null,
   POLICY_AUTO_PREINSTALL   NUMERIC(1)             null,
   POLICY_AUTO_UPGRADE      NUMERIC(1)             null,
   POLICY_PARTIAL_UPGRADE   NUMERIC(1)             null,
   NETWORK_RESOURCE_MGMT_ENABLED      NUMERIC(1)             null,
   CAPAB_DVS_OPERATION      NUMERIC(1)             null,
   CAPAB_DVPORTGROUP_OPERATION   NUMERIC(1)       null,
   CAPAB_DVPORT_OPERATION   NUMERIC(1)             null,
   MAX_MTU                  int                   null,
   PROMISCUOUS_VSPAN        VARCHAR(50)          null,
   LDP_PROTOCOL_TYPE        VARCHAR(50)          null,
   LDP_OPERATION            VARCHAR(50)          null,
   DEFAULT_PROXYSWITCH_MAX_PORTS       INTEGER               null,
   FEATURE_CAPAB_VMDIRECTPATH      NUMERIC(1)             null,
   LACP_API_VERSION         VARCHAR(50)            null,
   NETWORK_RESOURCE_CTRL_VERSION VARCHAR(50)     null,
   MULTICAST_FILTERING_MODE VARCHAR(50)          null,
   constraint PK_VPX_DVS    primary key  (ID),
   constraint FK_VPX_DVS_REF_VPX_ENTI foreign key (ID)
      references VPX_ENTITY (ID)
         on delete cascade
)
;

/* Index for VpxdSqlList.cpp "FindDvsByUuid" */
CREATE INDEX VPX_DVS_F1 ON VPX_DVS(UUID);
/* Index for VpxdSqlList.cpp "FindDvsByName" */
CREATE INDEX VPX_DVS_F2 ON VPX_DVS(NAME);
/* Index for VpxdSqlList.cpp "FindDvsByExtensionKey" */
CREATE INDEX VPX_DVS_F3 ON VPX_DVS(EXTENSION_KEY);


/*==============================================================*/
/* Table: VPX_DVS_COMPATIBLE                                               */
/*==============================================================*/
create table VPX_DVS_COMPATIBLE (
   ID                       BIGINT                not null,
   PRODUCT_LINE             VARCHAR(255)          null,
   PRODUCT_VERSION          VARCHAR(255)          null,
   SURR_KEY                 SERIAL,
   constraint PK_VPX_DVS_COMPATIBLE primary key (ID, SURR_KEY),
   constraint FK_VPX_DVS_COMPAT_REF_VPX_ENTI foreign key (ID)
      references VPX_ENTITY (ID)
         on delete cascade
)
;

/*==============================================================*/
/* Table: VPX_DVS_UPLINK                                        */
/*==============================================================*/
create table VPX_DVS_UPLINK (
   ID                       BIGINT                not null,
   UPLINK_PORT_NAME         VARCHAR(255)          not null,
   UPLINK_INDEX             INTEGER                null,
   SURR_KEY					SERIAL,
   constraint PK_VPX_DVS_UPLINK primary key (ID,SURR_KEY),
   constraint FK_VPX_DVS_UPLINK_REF_VPX_ENTI foreign key (ID)
      references VPX_ENTITY (ID)
         on delete cascade
)
;

/*==============================================================*/
/* Table: VPX_DVPORTGROUP                                       */
/*==============================================================*/
create table VPX_DVPORTGROUP (
   ID                       BIGINT              not null,
   DVS_ID                   BIGINT              not null,
   DVPORTGROUP_NAME         VARCHAR(255)        not null,
   DVPORTGROUP_KEY          VARCHAR(255)        not null,
   DVPORTGROUP_TYPE         VARCHAR(255)        not null,
   DESCRIPTION              VARCHAR(255)        null,
   PORT_NAME_FORMAT         VARCHAR(255)        null,
   POLICY_BLOCK_OVERRIDE    NUMERIC(1)            null,
   POLICY_NRP_OVERRIDE      NUMERIC(1)            null,
   POLICY_SHAPING_OVERRIDE  NUMERIC(1)            null,
   POLICY_BLOB_OVERRIDE     NUMERIC(1)            null,
   POLICY_LIVE_PORT_MOVE    NUMERIC(1)            null,
   POLICY_RESET_AT_CONNECT  NUMERIC(1)            null,
   POLICY_OVERLAY_OVERRIDE  NUMERIC(1)            null,
   TRAFFIC_FILTER_OVERRIDE NUMERIC(1)    null,
   NUM_PORT                 INTEGER             ,
   UPLINK_PORTGROUP_FLG     NUMERIC(1)  default 0,
   POLICY_VLAN_OVERRIDE       NUMERIC(1)            null,
   POLICY_UPLINK_OVERRIDE     NUMERIC(1)            null,
   POLICY_SECURITY_OVERRIDE   NUMERIC(1)            null,
   POLICY_IPFIX_OVERRIDE      NUMERIC(1)            null,
   AUTO_EXPAND                 NUMERIC(1) default 0     not null,
   CONFIG_NUM_PORT             INTEGER             ,
   VMVNIC_RESOURCEPOOL_KEY  VARCHAR(255)        null,
   constraint PK_VPX_DVPORTGROUP PRIMARY KEY (ID),
   constraint FK_VPX_DVPORTGRP_REF_VPX_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

CREATE INDEX VPX_DVPORTGROUP_F1 ON VPX_DVPORTGROUP(DVS_ID);

/*==============================================================*/
/* Table: VPX_DVHOST                                            */
/*==============================================================*/
create table VPX_DVHOST (
   DVS_ID                   BIGINT               not null,
   HOST_ID                  BIGINT               not null,
   MAX_PORT                 INTEGER              null,
   CURRENT_MAX_PORT         INTEGER              null,
   PRODUCT_NAME             VARCHAR(255)        null,
   PRODUCT_VENDOR           VARCHAR(255)        null,
   PRODUCT_VERSION          VARCHAR(255)        null,
   PRODUCT_BUILD            VARCHAR(255)        null,
   VSWITCH_KEY              VARCHAR(255)        null,
   STATUS                   VARCHAR(255)        null,
   STATUS_DETAIL            VARCHAR(255)        null,
   HAS_SHADOW_PORTS         NUMERIC(1)             null,
   constraint PK_VPX_DVHOST primary key (DVS_ID, HOST_ID),
   constraint FK_VPX_DVHOST_REF_VPX_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

CREATE INDEX VPX_DVHOST_F1 ON VPX_DVHOST(HOST_ID);


/*==============================================================*/
/* Table: VPX_DVPORT_SETTING                                    */
/*==============================================================*/
create table VPX_DVPORT_SETTING (
   DVS_ID                      BIGINT                not null,
   DVPORTGROUP_ID              BIGINT          default 0 not null,
   DVPORT_KEY                  VARCHAR(50)       null,
   BLOCKED_FLG                 NUMERIC(1)            null,
   NRP_KEY                     VARCHAR(50)           null,
   IN_SHAPING_OBJECT_FLG       NUMERIC(1)            null,
   IN_SHAPING_AVG_BANDWIDTH    VARCHAR(50)                   null,
   IN_SHAPING_BURST_SIZE       VARCHAR(50)                   null,
   IN_SHAPING_ENABLED          NUMERIC(1)            null,
   IN_SHAPING_PEAK_BANDWIDTH   VARCHAR(50)                   null,
   OUT_SHAPING_OBJECT_FLG      NUMERIC(1)            null,
   OUT_SHAPING_AVG_BANDWIDTH   VARCHAR(50)                   null,
   OUT_SHAPING_BURST_SIZE      VARCHAR(50)                   null,
   OUT_SHAPING_ENABLED         NUMERIC(1)            null,
   OUT_SHAPING_PEAK_BANDWIDTH  VARCHAR(50)                   null,
   VLAN_OBJECT_FLG             NUMERIC(1)            null,
   VLAN_ID                     int                   null,
   TRUNK_MODE_FLG              NUMERIC(1)            null,
   PVLAN_ID                    int                   null,
   QOS_TAG                     int                   null,
   TX_UPLINK                  NUMERIC(1)            null,
   IPFIX_OBJECT_FLG            NUMERIC(1)            null,
   IPFIX_ENABLED               NUMERIC(1)            null,
   SEC_POLICY_OBJECT_FLG       NUMERIC(1)            null,
   ALLOW_PROMISCUOUS           NUMERIC(1)            null,
   FORGED_TRANSMITS            NUMERIC(1)            null,
   MAC_CHANGES                 NUMERIC(1)            null,
   TEAMING_OBJECT_FLG          NUMERIC(1)            null,
   TEAMING_POLICY              VARCHAR(50)           null,
   TEAMING_REVERSE             NUMERIC(1)            null,
   TEAMING_NOTIFY              NUMERIC(1)            null,
   TEAMING_ROLLING             NUMERIC(1)            null,
   CRITERIA_OBJECT_FLG         NUMERIC(1)            null,
   TEAMING_FAIL_CHK_BEACON     NUMERIC(1)            null,
   TEAMING_FAIL_CHK_DUPLEX     NUMERIC(1)            null,
   TEAMING_FAIL_CHK_PERCENT    NUMERIC(1)            null,
   TEAMING_FAIL_CHK_SPEED      VARCHAR(50)           null,
   TEAMING_FAIL_DUPLEX         NUMERIC(1)            null,
   TEAMING_FAIL_PERCENT        int                   null,
   TEAMING_FAIL_SPEED          int                   null,
   UPLINK_ORDER_OBJECT_FLG     NUMERIC(1)            null,
   VENDOR_BLOB_OBJECT_FLG      NUMERIC(1)            null,
   OVERLAY_OBJECT_FLG          NUMERIC(1)            null,
   NPT_ALLOWED_FLG             NUMERIC(1)            null,
   LACP_ENABLE                 NUMERIC(1)            null,
   LACP_MODE                   VARCHAR(50)           null,
   TRAFFIC_FILTER_OBJ_FLG      NUMERIC(1)            null,
   MAC_MGMT_OBJECT_FLG         NUMERIC(1)            null,
   MAC_MGMT_ALLOW_PROMISCUOUS  NUMERIC(1)            null,
   MAC_MGMT_FORGED_TRANSMITS   NUMERIC(1)            null,
   MAC_MGMT_MAC_CHANGES        NUMERIC(1)            null,
   MAC_LEARNING_OBJECT_FLG     NUMERIC(1)            null,
   MAC_LEARNING_ENABLED        NUMERIC(1)            null,
   ALLOW_UNICAST_FLOODING      NUMERIC(1)            null,
   MAC_LEARNING_LIMIT          int                   null,
   MAC_LEARNING_LIMIT_POLICY   VARCHAR(50)           null,
   SURR_KEY					   SERIAL,
   constraint PK_VPX_DVPORT_SETTING primary key (DVS_ID,SURR_KEY),
   constraint FK_VPX_DVPORT_STG_REF_VPX_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

CREATE UNIQUE INDEX VPX_DVPORT_SETTING_U1 ON VPX_DVPORT_SETTING(DVS_ID, DVPORTGROUP_ID, DVPORT_KEY);
/* Index for VpxdSqlList.cpp "GetPvlanIds", "GetVlanIdReferredInDvs1" */
CREATE INDEX VPX_DVPORT_SETTING_M1 ON VPX_DVPORT_SETTING(DVS_ID, DVPORTGROUP_ID, DVPORT_KEY, PVLAN_ID, VLAN_ID);
/* Index for VpxdInvtDVS::ValidatePortSettingOverrideInDB */
CREATE INDEX VPX_DVPORT_SETTING_M2 ON VPX_DVPORT_SETTING(DVS_ID, DVPORTGROUP_ID, DVPORT_KEY, BLOCKED_FLG, IN_SHAPING_OBJECT_FLG, OUT_SHAPING_OBJECT_FLG, SEC_POLICY_OBJECT_FLG, VLAN_OBJECT_FLG, TEAMING_OBJECT_FLG, OVERLAY_OBJECT_FLG);


/*==============================================================*/
/* Table: VPX_DVPORT                                            */
/*==============================================================*/
create table VPX_DVPORT (
   DVS_ID                          BIGINT          not null,
   DVPORT_KEY                      VARCHAR(50)     not null,
   NAME                            VARCHAR(255)    null,
   DESCRIPTION                     VARCHAR(255)    null,
   CONFIG_VERSION                  INTEGER           null,
   LINK_UP                         NUMERIC(1)        null,
   LINK_BLOCKED                    NUMERIC(1)        null,
   PROXY_HOST                      VARCHAR(255)    null,
   TRUNK_MODE_FLG                  NUMERIC(1)        null,
   CONFLICT_FLG                    NUMERIC(1)        null,
   CONFLICT_PORT_KEY               VARCHAR(255)    null,
   CONNECTION_COOKIE               INTEGER          null,
   LAST_STATUS_CHANGE              TIMESTAMP             null,
   MTU                             INTEGER          null,
   LINK_PEER                       VARCHAR(255)    null,
   MAC_ADDRESS                     VARCHAR(255)    null,
   STATUS_DETAIL                   VARCHAR(255)    null,
   STATS_PACKET_IN_MULTICAST       VARCHAR(50)     null,
   STATS_PACKET_OUT_MULTICAST      VARCHAR(50)     null,
   STATS_BYTE_IN_MULTICAST         VARCHAR(50)     null,
   STATS_BYTE_OUT_MULTICAST        VARCHAR(50)     null,
   STATS_PACKET_IN_UNICAST         VARCHAR(50)     null,
   STATS_PACKET_OUT_UNICAST        VARCHAR(50)     null,
   STATS_BYTE_IN_UNICAST           VARCHAR(50)     null,
   STATS_BYTE_OUT_UNICAST          VARCHAR(50)     null,
   STATS_PACKET_IN_BROADCAST       VARCHAR(50)     null,
   STATS_PACKET_OUT_BROADCAST      VARCHAR(50)     null,
   STATS_BYTE_IN_BROADCAST         VARCHAR(50)     null,
   STATS_BYTE_OUT_BROADCAST        VARCHAR(50)     null,
   STATS_PACKET_IN_DROPPED         VARCHAR(50)     null,
   STATS_PACKET_OUT_DROPPED        VARCHAR(50)     null,
   STATS_PACKET_IN_EXCEPTION       VARCHAR(50)     null,
   STATS_PACKET_OUT_EXCEPTION      VARCHAR(50)     null,
   PERSISTENCE_LOCATION            VARCHAR(255)    null,
   CONNECTEE                       VARCHAR(255)    null,
   CONNECTEE_TYPE                  VARCHAR(255)    null,
   CONNECTEE_NIC_KEY               VARCHAR(255)    null,
   CONNECTEE_ADDRESS               VARCHAR(255)    null,
   RESERVED_TIME                   VARCHAR(50)     null,
   POWERING_ON_FLG                 NUMERIC(1)         null,
   LAST_CONNECTEE                  VARCHAR(255)     null,
   NPT_ACTIVE                      NUMERIC(1)      null,
   NPT_INACTIVE_NET                INTEGER         null,
   NPT_INACTIVE_OTHER              INTEGER         null,
   NPT_INACTIVE_MISC               VARCHAR(255)    null,
   REPUSH_NEEDED_FLG               NUMERIC(1)      null,
   HOST_LOCAL_PORT_FLG             NUMERIC(1)      null,
   constraint PK_VPX_DVPORT primary key (DVS_ID, DVPORT_KEY),
   constraint FK_VPX_DVPORT_REF_VPX_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

create index VPX_DVPORT_M1 on VPX_DVPORT(CONNECTEE);
create index VPX_DVPORT_M2 on VPX_DVPORT(PROXY_HOST);
/* Index for VpxdSqlList.cpp "FindDvsConnectionOnHost",       */
/*                           "FindVmConnectedPortInPortgroup" */
/*                           "FindReservedPorts"              */
create index VPX_DVPORT_M3 on VPX_DVPORT(CONNECTEE, CONNECTEE_NIC_KEY, CONNECTEE_TYPE, RESERVED_TIME);

/*
 * Aggressive autovacuum for VPX_DVPORT to reduce fragmentation caused by huge
 * amount of updates.
 */
ALTER TABLE VPX_DVPORT SET (autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_DVPORT SET (toast.autovacuum_vacuum_scale_factor = 0.05);
ALTER TABLE VPX_DVPORT SET (autovacuum_analyze_scale_factor = 0.05);
ALTER TABLE VPX_DVPORT SET (autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_DVPORT SET (toast.autovacuum_vacuum_threshold = 25);
ALTER TABLE VPX_DVPORT SET (autovacuum_analyze_threshold = 25);
ALTER TABLE VPX_DVPORT SET (autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_DVPORT SET (toast.autovacuum_vacuum_cost_delay = 10);
ALTER TABLE VPX_DVPORT SET (autovacuum_vacuum_cost_limit = 1000);
ALTER TABLE VPX_DVPORT SET (toast.autovacuum_vacuum_cost_limit = 1000);


/*==============================================================*/
/* Table: VPX_DVS_NRP                                            */
/*==============================================================*/
create table VPX_DVS_NRP (
   DVS_ID                          BIGINT          not null,
   NRP_KEY                         VARCHAR(50)     not null,
   NAME                            VARCHAR(255)            ,
   DESCRIPTION                     VARCHAR(255)            ,
   CONFIG_VERSION                  NUMERIC(21)                ,
   PTAG                            INTEGER               null,
   ALLOCATION_LIMIT	           NUMERIC(21)                ,
   ALLOCATION_SHARES_SHARES	   INTEGER                   ,
   ALLOCATION_SHARES_LEVEL	   VARCHAR(255)            ,
   constraint PK_VPX_DVS_NRP primary key (DVS_ID, NRP_KEY),
   constraint FK_VPX_DVS_NRP_REF_VPX_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;


/*==============================================================*/
/* Table: VPX_DVPORT_MEMBERSHIP                                            */
/*==============================================================*/
create table VPX_DVPORT_MEMBERSHIP (
   DVPORT_KEY                      VARCHAR(50)     not null,
   DVS_ID                          BIGINT          not null,
   DVPORTGROUP_ID                  BIGINT default 0 not null,
   HOST_ID                         BIGINT default 0 not null,
   LAG_KEY                         VARCHAR(50)     null,
   constraint PK_VPX_DVPORT_MEMBERSHIP primary key (DVS_ID, DVPORT_KEY),
   constraint FK_VPX_DVPORT_MEM_REF foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

CREATE INDEX VPX_DVPORT_MEMBERSHIP_F1 ON VPX_DVPORT_MEMBERSHIP(HOST_ID);
CREATE INDEX VPX_DVPORT_MEMBERSHIP_F2 ON VPX_DVPORT_MEMBERSHIP(DVPORTGROUP_ID);

/*==============================================================*/
/* Table: VPX_DVS_SCOPE                                         */
/*==============================================================*/
create table VPX_DVS_SCOPE (
   DVS_ID                   BIGINT          not null,
   DVPORTGROUP_ID           BIGINT default 0 not null,
   DVPORT_KEY               VARCHAR(50)     null,
   SCOPE                    VARCHAR(255)    null,
   SURR_KEY					SERIAL,
   constraint PK_VPX_DVS_SCOPE primary key (DVS_ID,SURR_KEY),
   constraint FK_VPX_DVS_SCOPE_REF_VPX_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

/* Index for VpxdSqlList.cpp "getPortGroupScope" */
CREATE INDEX VPX_DVS_SCOPE_M1 ON VPX_DVS_SCOPE(DVS_ID, DVPORTGROUP_ID, DVPORT_KEY, SCOPE);


/*==============================================================*/
/* Table: VPX_DVS_VSPAN_SESSION                                 */
/*==============================================================*/
create table VPX_DVS_VSPAN_SESSION (
   DVS_ID                   BIGINT          not null,
   VSPAN_SESSION_KEY        VARCHAR(50)     not null,
   SESSION_TYPE             VARCHAR(255)    not null,
   NAME                     VARCHAR(255)    null,
   DESCRIPTION              VARCHAR(255)    null,
   SESSION_ENABLED          NUMERIC(1)      null,
   ENCAPSULATION_VLANID     INTEGER         null,
   STRIP_ORIGINAL_VLAN      NUMERIC(1)      null,
   MIRRORED_PACKET_LENGTH   INTEGER         null,
   NORMAL_TRAFFIC_ALLOWED   NUMERIC(1)      null,
   SAMPLING_RATE            INTEGER         null,
   ENCAP_TYPE               VARCHAR(50)     null,
   ERSPAN_ID                INTEGER         null,
   ERSPAN_COS               INTEGER         null,
   ERSPAN_GRA_NANOSEC       NUMERIC(1)      null,
   VSPAN_NETSTACK           VARCHAR(20)     null,
   SURR_KEY                 SERIAL,
   constraint PK_VPX_DVS_VSPAN_SESSION primary key (DVS_ID,SURR_KEY),
   constraint FK_DVS_VSPAN_SESSION_REF_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

CREATE UNIQUE INDEX VPX_DVS_VSPAN_SESSION_U1 ON VPX_DVS_VSPAN_SESSION(DVS_ID,VSPAN_SESSION_KEY);

/*==============================================================*/
/* Table: VPX_DVS_HC_CONFIG                            */
/*==============================================================*/
create table VPX_DVS_HC_CONFIG (
   DVS_ID                   BIGINT         not null,
   HEALTHCHECK_TYPE         VARCHAR(255)    not null,
   ENABLE                   NUMERIC(1)      not null,
   INTERVAL                 INTEGER,
   SURR_KEY					    SERIAL,
   constraint PK_VPX_DVS_HC_CONFIG PRIMARY KEY (DVS_ID,SURR_KEY),
   constraint FK_DVS_HC_CONFIG_REF_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

/*==============================================================*/
/* Table: VPX_DVHOST_HC_RESULT                         */
/*==============================================================*/
create table VPX_DVHOST_HC_RESULT (
   DVS_ID                   BIGINT                not null,
   HOST_ID                  BIGINT                not null,
   UPLINK_PORT_KEY          VARCHAR(50)         not null,
   HEALTHCHECK_TYPE         VARCHAR(255)        not null,
   SUMMARY                  VARCHAR(255)        ,
   TEAMING_MATCH_STATUS     VARCHAR(50)         ,
   PNIC_MTU_MATCH_STATUS    NUMERIC(1)             ,
   SURR_KEY					SERIAL,
   constraint PK_VPX_DVHOST_HC_RESULT primary key (DVS_ID,SURR_KEY),
   constraint FK_DVHOST_HC_RESULT_REF_ENTI foreign key (DVS_ID, HOST_ID)
         references VPX_DVHOST (DVS_ID, HOST_ID)
         on delete cascade
)
;

CREATE INDEX VPX_DVHOST_HC_RESULT_M1 ON VPX_DVHOST_HC_RESULT(DVS_ID,HOST_ID);

/*==============================================================*/
/* Table: VPX_DVHOST_HC_VLAN_RESULT                    */
/*==============================================================*/
create table VPX_DVHOST_HC_VLAN_RESULT (
   DVS_ID                   BIGINT                not null,
   HOST_ID                  BIGINT                not null,
   UPLINK_PORT_KEY          VARCHAR(50)         not null,
   TRUNKED_FLG              NUMERIC(1)             not null,
   VLAN_ID_START            INTEGER                not null,
   VLAN_ID_END              INTEGER                not null,
   SURR_KEY					SERIAL,
   constraint PK_VPX_DVHOST_HC_VLAN_RESULT primary key (DVS_ID,SURR_KEY),
   constraint FK_HC_VLAN_RESULT_REF_ENTI foreign key (DVS_ID, HOST_ID)
         references VPX_DVHOST (DVS_ID, HOST_ID)
         on delete cascade
)
;

CREATE INDEX VPX_DVHOST_HC_VLAN_RESULT_M1 ON VPX_DVHOST_HC_VLAN_RESULT(DVS_ID,HOST_ID,UPLINK_PORT_KEY);

/*==============================================================*/
/* Table: VPX_DVHOST_HC_MTU_RESULT                     */
/*==============================================================*/
create table VPX_DVHOST_HC_MTU_RESULT (
   DVS_ID                   BIGINT                not null,
   HOST_ID                  BIGINT                not null,
   UPLINK_PORT_KEY          VARCHAR(50)         not null,
   SUPPORTED_FLG            NUMERIC(1)             not null,
   VLAN_ID_START            INTEGER                not null,
   VLAN_ID_END              INTEGER                not null,
   SURR_KEY					SERIAL,
   constraint PK_VPX_DVHOST_HC_MTU_RESULT primary key (DVS_ID,SURR_KEY),
   constraint FK_HC_MTU_RESULT_REF_ENTI foreign key (DVS_ID, HOST_ID)
         references VPX_DVHOST (DVS_ID, HOST_ID)
         on delete cascade
)
;

CREATE INDEX VPX_DVHOST_HC_MTU_RESULT_M1 ON VPX_DVHOST_HC_MTU_RESULT(DVS_ID,HOST_ID,UPLINK_PORT_KEY);

/*==============================================================*/
/* Table: VPX_DVS_IPFIX                                         */
/*==============================================================*/
create table VPX_DVS_IPFIX (
   DVS_ID                   BIGINT         not null,
   COLLECTOR_IP             VARCHAR(50)       null,
   COLLECTOR_PORT           INTEGER             null,
   ACTIVE_FLOW_TIMEOUT     INTEGER         not null,
   IDLE_FLOW_TIMEOUT        INTEGER         not null,
   SAMPLING_RATE            INTEGER         not null,
   INTERNAL_FLOWS_ONLY      NUMERIC(1)      not null,
   OBSERVATION_DOMAIN_ID    BIGINT              null,
   SURR_KEY                 SERIAL,
   constraint PK_VPX_DVS_IPFIX primary key (DVS_ID,SURR_KEY),
   constraint FK_VPX_DVS_IPFIX_DVS foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

/*==============================================================*/
/* Table: VPX_DVS_VSPAN_PORTS                                   */
/*==============================================================*/
create table VPX_DVS_VSPAN_PORTS (
   DVS_ID                   BIGINT        not null,
   VSPAN_SESSION_KEY        VARCHAR(50)    not null,
   PORT_USE                 VARCHAR(255)   not null,
   PORT_IDENTIFIER_TYPE     VARCHAR(255)   not null,
   PORT_IDENTIFIER_VALUE    VARCHAR(255)    ,
   VLAN_ID                  INTEGER         ,
   IP_ADDRESS               VARCHAR(255)    ,
   SURR_KEY					SERIAL,
   constraint PK_VPX_DVS_VSPAN_PORTS primary key (DVS_ID,SURR_KEY),
   constraint FK_DVS_VSPAN_PORTS_REF_ENTI foreign key (DVS_ID)
      references VPX_DVS (ID)
         on delete cascade
)
;

/*==============================================================*/
/* Table: VPX_DVS_PVLAN                                         */
/*==============================================================*/
