Ускорение режима все партии — различия между версиями

Материал из wiki.standart-n.ru
Перейти к: навигация, поиск
Строка 1: Строка 1:
 +
=I вариант=
  
 
<pre>
 
<pre>
 
/******************************************************************************/
 
/******************************************************************************/
/***              Generated by IBExpert 04.03.2016 16:16:39               ***/
+
/***              Generated by IBExpert 07.03.2016 15:48:01               ***/
 
/******************************************************************************/
 
/******************************************************************************/
  
Строка 19: Строка 20:
  
 
CREATE TABLE WAREBASEPARTS (
 
CREATE TABLE WAREBASEPARTS (
     PART_ID        BIGINT NOT NULL,
+
     PART_ID        DM_ID NOT NULL /* DM_ID = BIGINT */,
     WARE_ID        CHAR(36) NOT NULL,
+
     WARE_ID        DM_UUID NOT NULL /* DM_UUID = CHAR(36) NOT NULL */,
     SNAME          VARCHAR(250),
+
     SNAME          DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     SIZG            VARCHAR(250),
+
     SIZG            DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     SCOUNTRY        VARCHAR(250),
+
     SCOUNTRY        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     ORIG_CODE      VARCHAR(250),
+
     ORIG_CODE      DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     SORIG_NAME      VARCHAR(250),
+
     SORIG_NAME      DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     SORIG_IZG      VARCHAR(250),
+
     SORIG_IZG      DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     SORIG_COUNTRY  VARCHAR(250),
+
     SORIG_COUNTRY  DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     BCODE_IZG      VARCHAR(250),
+
     BCODE_IZG      DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     PRICE          DOUBLE PRECISION,
+
     PRICE          DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     PRICE_O        DOUBLE PRECISION,
+
     PRICE_O        DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     PRICE_Z        DOUBLE PRECISION,
+
     PRICE_Z        DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     PRICE_R        DOUBLE PRECISION,
+
     PRICE_R        DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     QUANT          DOUBLE PRECISION,
+
     QUANT          DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     BARCODE        VARCHAR(250),
+
     BARCODE        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     BARCODE1        VARCHAR(250),
+
     BARCODE1        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     DEP            BIGINT,
+
     DEP            DM_ID /* DM_ID = BIGINT */,
     KRITK          BIGINT,
+
     KRITK          DM_ID /* DM_ID = BIGINT */,
     GODENDO        TIMESTAMP,
+
     GODENDO        DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
     SERIA          VARCHAR(250),
+
     SERIA          DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     SUM_NDSO        DOUBLE PRECISION,
+
     SUM_NDSO        DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     SERT            VARCHAR(250),
+
     SERT            DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     DATESERT        TIMESTAMP,
+
     DATESERT        DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
     KEMVSERT        VARCHAR(250),
+
     KEMVSERT        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     SDSERT          TIMESTAMP,
+
     SDSERT          DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
     REGN            VARCHAR(250),
+
     REGN            DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     NGTD            VARCHAR(250),
+
     NGTD            DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     EDIZM          VARCHAR(250),
+
     EDIZM          DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     DOC_ID          BIGINT,
+
     DOC_ID          DM_ID /* DM_ID = BIGINT */,
     DOCNUM          VARCHAR(250),
+
     DOCNUM          DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     DOCDATE        TIMESTAMP,
+
     DOCDATE        DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
     DOCCAPTION      VARCHAR(250),
+
     DOCCAPTION      DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     DOCAGENT        VARCHAR(250),
+
     DOCAGENT        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     DOCVNUM        BIGINT,
+
     DOCVNUM        DM_ID /* DM_ID = BIGINT */,
     DOCVSHIFT      BIGINT,
+
     DOCVSHIFT      DM_ID /* DM_ID = BIGINT */,
     INSERTDT        TIMESTAMP,
+
     INSERTDT        DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
     UPDATEDT        TIMESTAMP,
+
     UPDATEDT        DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
     ENDDT          TIMESTAMP,
+
     ENDDT          DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
     NDS            DOUBLE PRECISION,
+
     NDS            DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     REALQUANT      DOUBLE PRECISION,
+
     REALQUANT      DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     PART_PARENT_ID  BIGINT,
+
     PART_PARENT_ID  DM_ID /* DM_ID = BIGINT */,
     NAME_ID        CHAR(36),
+
     NAME_ID        DM_UUID NOT NULL /* DM_UUID = CHAR(36) NOT NULL */,
     IZG_ID          CHAR(36),
+
     IZG_ID          DM_UUID NOT NULL /* DM_UUID = CHAR(36) NOT NULL */,
     COUNTRY_ID      CHAR(36),
+
     COUNTRY_ID      DM_UUID NOT NULL /* DM_UUID = CHAR(36) NOT NULL */,
     NAC            DOUBLE PRECISION,
+
     NAC            DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     BLOCK_QUANT    DOUBLE PRECISION,
+
     BLOCK_QUANT    DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
     BLOCK_COUNT    INTEGER,
+
     BLOCK_COUNT    DM_STATUS /* DM_STATUS = INTEGER */,
     MMBSH          VARCHAR(1024),
+
     MMBSH          DM_TEXT1024 /* DM_TEXT1024 = VARCHAR(1024) */,
     PART_TYPE      INTEGER,
+
     PART_TYPE      DM_STATUS /* DM_STATUS = INTEGER */,
     BASE_AGENT_ID  BIGINT,
+
     BASE_AGENT_ID  DM_ID /* DM_ID = BIGINT */,
     SBASE_AGENT_ID  VARCHAR(250),
+
     SBASE_AGENT_ID  DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     CONTRACT_ID    BIGINT,
+
     CONTRACT_ID    DM_ID /* DM_ID = BIGINT */,
     SCONTRACT_ID    VARCHAR(250),
+
     SCONTRACT_ID    DM_TEXT /* DM_TEXT = VARCHAR(250) */,
     GROUP_ID        BIGINT,
+
     GROUP_ID        DM_ID /* DM_ID = BIGINT */,
     ISFOLDER        INTEGER,
+
     ISFOLDER        DM_STATUS /* DM_STATUS = INTEGER */,
     MNN            VARCHAR(250)
+
     MNN            DM_TEXT /* DM_TEXT = VARCHAR(250) */
 
);
 
);
  
  
 +
 +
 +
/******************************************************************************/
 +
/***                              Primary Keys                              ***/
 +
/******************************************************************************/
 +
 +
ALTER TABLE WAREBASEPARTS ADD CONSTRAINT PK_WAREBASEPARTS PRIMARY KEY (PART_ID);
  
  

Версия 16:45, 7 марта 2016

I вариант

/******************************************************************************/
/***               Generated by IBExpert 07.03.2016 15:48:01                ***/
/******************************************************************************/

/******************************************************************************/
/***      Following SET SQL DIALECT is just for the Database Comparer       ***/
/******************************************************************************/
SET SQL DIALECT 3;



/******************************************************************************/
/***                                 Tables                                 ***/
/******************************************************************************/



CREATE TABLE WAREBASEPARTS (
    PART_ID         DM_ID NOT NULL /* DM_ID = BIGINT */,
    WARE_ID         DM_UUID NOT NULL /* DM_UUID = CHAR(36) NOT NULL */,
    SNAME           DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    SIZG            DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    SCOUNTRY        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    ORIG_CODE       DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    SORIG_NAME      DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    SORIG_IZG       DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    SORIG_COUNTRY   DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    BCODE_IZG       DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    PRICE           DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    PRICE_O         DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    PRICE_Z         DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    PRICE_R         DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    QUANT           DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    BARCODE         DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    BARCODE1        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    DEP             DM_ID /* DM_ID = BIGINT */,
    KRITK           DM_ID /* DM_ID = BIGINT */,
    GODENDO         DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
    SERIA           DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    SUM_NDSO        DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    SERT            DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    DATESERT        DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
    KEMVSERT        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    SDSERT          DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
    REGN            DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    NGTD            DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    EDIZM           DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    DOC_ID          DM_ID /* DM_ID = BIGINT */,
    DOCNUM          DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    DOCDATE         DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
    DOCCAPTION      DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    DOCAGENT        DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    DOCVNUM         DM_ID /* DM_ID = BIGINT */,
    DOCVSHIFT       DM_ID /* DM_ID = BIGINT */,
    INSERTDT        DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
    UPDATEDT        DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
    ENDDT           DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
    NDS             DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    REALQUANT       DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    PART_PARENT_ID  DM_ID /* DM_ID = BIGINT */,
    NAME_ID         DM_UUID NOT NULL /* DM_UUID = CHAR(36) NOT NULL */,
    IZG_ID          DM_UUID NOT NULL /* DM_UUID = CHAR(36) NOT NULL */,
    COUNTRY_ID      DM_UUID NOT NULL /* DM_UUID = CHAR(36) NOT NULL */,
    NAC             DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    BLOCK_QUANT     DM_DOUBLE /* DM_DOUBLE = DOUBLE PRECISION */,
    BLOCK_COUNT     DM_STATUS /* DM_STATUS = INTEGER */,
    MMBSH           DM_TEXT1024 /* DM_TEXT1024 = VARCHAR(1024) */,
    PART_TYPE       DM_STATUS /* DM_STATUS = INTEGER */,
    BASE_AGENT_ID   DM_ID /* DM_ID = BIGINT */,
    SBASE_AGENT_ID  DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    CONTRACT_ID     DM_ID /* DM_ID = BIGINT */,
    SCONTRACT_ID    DM_TEXT /* DM_TEXT = VARCHAR(250) */,
    GROUP_ID        DM_ID /* DM_ID = BIGINT */,
    ISFOLDER        DM_STATUS /* DM_STATUS = INTEGER */,
    MNN             DM_TEXT /* DM_TEXT = VARCHAR(250) */
);




/******************************************************************************/
/***                              Primary Keys                              ***/
/******************************************************************************/

ALTER TABLE WAREBASEPARTS ADD CONSTRAINT PK_WAREBASEPARTS PRIMARY KEY (PART_ID);


/******************************************************************************/
/***                               Privileges                               ***/
/******************************************************************************/