------------------------------------------------------------------
--                                                              --
--  File:   Create_Indexes_Fixed_Tables.SQL                     --
--          Microsoft TPC-E Benchmark Kit Ver. 1.12.0-1022      --
--          Copyright Microsoft  2008, 2009, 2010               --
--                                                              --
--  NOTE:   This file is generated by TPCE_SETUP.CMD based on   --
--          the number of processors on the system.             --
--                                                              --
------------------------------------------------------------------
USE tpce
GO
 
---
--- Set connection attributes
---
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET ARITHABORT ON
SET CONCAT_NULL_YIELDS_NULL ON
SET QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
GO

-- *** ZIP_CODE *** 
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_ZIP_CODE' )
    CREATE UNIQUE CLUSTERED INDEX PK_ZIP_CODE ON ZIP_CODE(ZC_CODE)
        WITH (FILLFACTOR = 100, SORT_IN_TEMPDB = ON, MAXDOP = 96)
        ON tpce_fg
GO

CHECKPOINT
GO

-- *** CHARGE ***
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_CHARGE' )
    CREATE UNIQUE CLUSTERED INDEX PK_CHARGE ON CHARGE(CH_TT_ID, CH_C_TIER)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO 

-- *** EXCHANGE *** 
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_EXCHANGE' )
    CREATE UNIQUE CLUSTERED INDEX PK_EXCHANGE ON EXCHANGE(EX_ID)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

-- *** STATUS_TYPE *** 
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_STATUS_TYPE' )
    CREATE UNIQUE CLUSTERED INDEX PK_STATUS_TYPE ON STATUS_TYPE(ST_ID)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

-- *** COMMISSION_RATE ***
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_COMMISSION_RATE' )
    CREATE UNIQUE CLUSTERED INDEX PK_COMMISSION_RATE ON COMMISSION_RATE(CR_C_TIER, CR_TT_ID, CR_EX_ID, CR_FROM_QTY)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

-- *** TAXRATE *** 
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_TAXRATE' )
    CREATE UNIQUE CLUSTERED INDEX PK_TAXRATE ON TAXRATE(TX_ID)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

-- *** SECTOR *** 
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_SECTOR' )
    CREATE UNIQUE CLUSTERED INDEX PK_SECTOR ON SECTOR(SC_ID)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_SECTOR_NC1' )
    CREATE UNIQUE INDEX IX_SECTOR_NC1 ON SECTOR(SC_NAME, SC_ID)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

-- *** INDUSTRY *** 
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_INDUSTRY' )
    CREATE UNIQUE CLUSTERED INDEX PK_INDUSTRY ON INDUSTRY(IN_ID)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_INDUSTRY_NC1' )
    CREATE UNIQUE INDEX IX_INDUSTRY_NC1 ON INDUSTRY(IN_NAME, IN_ID)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

CHECKPOINT
GO

-- *** TRADE_TYPE *** 
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_TRADE_TYPE' )
    CREATE UNIQUE CLUSTERED INDEX PK_TRADE_TYPE ON TRADE_TYPE(TT_ID)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index0' )
    CREATE UNIQUE INDEX IX_TT_NC_index0 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index1' )
    CREATE UNIQUE INDEX IX_TT_NC_index1 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index2' )
    CREATE UNIQUE INDEX IX_TT_NC_index2 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index3' )
    CREATE UNIQUE INDEX IX_TT_NC_index3 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index4' )
    CREATE UNIQUE INDEX IX_TT_NC_index4 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index5' )
    CREATE UNIQUE INDEX IX_TT_NC_index5 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index6' )
    CREATE UNIQUE INDEX IX_TT_NC_index6 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index7' )
    CREATE UNIQUE INDEX IX_TT_NC_index7 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index8' )
    CREATE UNIQUE INDEX IX_TT_NC_index8 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index9' )
    CREATE UNIQUE INDEX IX_TT_NC_index9 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index10' )
    CREATE UNIQUE INDEX IX_TT_NC_index10 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index11' )
    CREATE UNIQUE INDEX IX_TT_NC_index11 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index12' )
    CREATE UNIQUE INDEX IX_TT_NC_index12 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index13' )
    CREATE UNIQUE INDEX IX_TT_NC_index13 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index14' )
    CREATE UNIQUE INDEX IX_TT_NC_index14 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index15' )
    CREATE UNIQUE INDEX IX_TT_NC_index15 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index16' )
    CREATE UNIQUE INDEX IX_TT_NC_index16 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index17' )
    CREATE UNIQUE INDEX IX_TT_NC_index17 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index18' )
    CREATE UNIQUE INDEX IX_TT_NC_index18 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index19' )
    CREATE UNIQUE INDEX IX_TT_NC_index19 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index20' )
    CREATE UNIQUE INDEX IX_TT_NC_index20 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index21' )
    CREATE UNIQUE INDEX IX_TT_NC_index21 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index22' )
    CREATE UNIQUE INDEX IX_TT_NC_index22 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index23' )
    CREATE UNIQUE INDEX IX_TT_NC_index23 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index24' )
    CREATE UNIQUE INDEX IX_TT_NC_index24 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index25' )
    CREATE UNIQUE INDEX IX_TT_NC_index25 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index26' )
    CREATE UNIQUE INDEX IX_TT_NC_index26 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index27' )
    CREATE UNIQUE INDEX IX_TT_NC_index27 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index28' )
    CREATE UNIQUE INDEX IX_TT_NC_index28 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index29' )
    CREATE UNIQUE INDEX IX_TT_NC_index29 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index30' )
    CREATE UNIQUE INDEX IX_TT_NC_index30 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index31' )
    CREATE UNIQUE INDEX IX_TT_NC_index31 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index32' )
    CREATE UNIQUE INDEX IX_TT_NC_index32 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index33' )
    CREATE UNIQUE INDEX IX_TT_NC_index33 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index34' )
    CREATE UNIQUE INDEX IX_TT_NC_index34 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index35' )
    CREATE UNIQUE INDEX IX_TT_NC_index35 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index36' )
    CREATE UNIQUE INDEX IX_TT_NC_index36 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index37' )
    CREATE UNIQUE INDEX IX_TT_NC_index37 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index38' )
    CREATE UNIQUE INDEX IX_TT_NC_index38 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index39' )
    CREATE UNIQUE INDEX IX_TT_NC_index39 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
Go

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index40' )
    CREATE UNIQUE INDEX IX_TT_NC_index40 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index41' )
    CREATE UNIQUE INDEX IX_TT_NC_index41 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index42' )
    CREATE UNIQUE INDEX IX_TT_NC_index42 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index43' )
    CREATE UNIQUE INDEX IX_TT_NC_index43 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index44' )
    CREATE UNIQUE INDEX IX_TT_NC_index44 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index45' )
    CREATE UNIQUE INDEX IX_TT_NC_index45 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index46' )
    CREATE UNIQUE INDEX IX_TT_NC_index46 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index47' )
    CREATE UNIQUE INDEX IX_TT_NC_index47 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index48' )
    CREATE UNIQUE INDEX IX_TT_NC_index48 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index49' )
    CREATE UNIQUE INDEX IX_TT_NC_index49 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index50' )
    CREATE UNIQUE INDEX IX_TT_NC_index50 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index51' )
    CREATE UNIQUE INDEX IX_TT_NC_index51 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index52' )
    CREATE UNIQUE INDEX IX_TT_NC_index52 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index53' )
    CREATE UNIQUE INDEX IX_TT_NC_index53 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index54' )
    CREATE UNIQUE INDEX IX_TT_NC_index54 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index55' )
    CREATE UNIQUE INDEX IX_TT_NC_index55 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index56' )
    CREATE UNIQUE INDEX IX_TT_NC_index56 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index57' )
    CREATE UNIQUE INDEX IX_TT_NC_index57 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index58' )
    CREATE UNIQUE INDEX IX_TT_NC_index58 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index59' )
    CREATE UNIQUE INDEX IX_TT_NC_index59 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index60' )
    CREATE UNIQUE INDEX IX_TT_NC_index60 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index61' )
    CREATE UNIQUE INDEX IX_TT_NC_index61 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index62' )
    CREATE UNIQUE INDEX IX_TT_NC_index62 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_TT_NC_index63' )
    CREATE UNIQUE INDEX IX_TT_NC_index63 ON TRADE_TYPE(TT_ID, TT_IS_MRKT, TT_IS_SELL, TT_NAME)
        WITH (FILLFACTOR = 100, MAXDOP = 96)
        ON tpce_fg
GO

CHECKPOINT
GO
