
print 'Start L_SHIPDATE_IDX'
SELECT SYSDATETIME() AS 'SYSDATETIME'
--create clustered index LINEITEM_IDX_L_ORDERKEY on LINEITEM(L_ORDERKEY) with(maxdop =40)
create clustered index L_SHIPDATE_IDX on LINEITEM(L_SHIPDATE) with(maxdop = 240) on DATESCHEME(L_SHIPDATE) 
print 'Finish L_SHIPDATE_IDX'
SELECT SYSDATETIME() AS 'SYSDATETIME'


print 'Start COLUMNSTORE L_SHIPDATE_IDX'
SELECT SYSDATETIME() AS 'SYSDATETIME'
--create clustered columnstore index LINEITEM_IDX_L_ORDERKEY on LINEITEM with(maxdop =40, drop_existing=on)
create clustered columnstore index L_SHIPDATE_IDX on LINEITEM  with(drop_existing=on, maxdop = 240) on DATESCHEME(L_SHIPDATE)
print 'Finish COLUMNSTORE L_SHIPDATE_IDX'
SELECT SYSDATETIME() AS 'SYSDATETIME'


print 'Start O_ORDERDATE_IDX'
SELECT SYSDATETIME() AS 'SYSDATETIME'
--create clustered index ORDERS_IDX_O_ORDERKEY on ORDERS(O_ORDERKEY) with(maxdop =40)
create clustered index O_ORDERDATE_IDX on ORDERS(O_ORDERDATE) with(maxdop = 240) on DATESCHEME(O_ORDERDATE) 
print 'Finish O_ORDERDATE_IDX'
SELECT SYSDATETIME() AS 'SYSDATETIME'


print 'Start COLUMNSTORE O_ORDERDATE_IDX'
SELECT SYSDATETIME() AS 'SYSDATETIME'
--create clustered columnstore index ORDERS_IDX_O_ORDERKEY on ORDERS with(maxdop =40, drop_existing=on)
create clustered columnstore index O_ORDERDATE_IDX on ORDERS with(drop_existing=on, maxdop = 240) on DATESCHEME(O_ORDERDATE)  
print 'Finish COLUMNSTORE O_ORDERDATE_IDX'
SELECT SYSDATETIME() AS 'SYSDATETIME'



create clustered columnstore index  	CUSTOMER_cstore on  	CUSTOMER	     

create clustered columnstore index  	SUPPLIER_cstore on  	SUPPLIER	 

create clustered columnstore index  	PARTSUPP_cstore on  	PARTSUPP	 

create clustered columnstore index  	PART_cstore on  	PART	  

create clustered columnstore index  	REGION_cstore on  	REGION	   

create clustered columnstore index  	NATION_cstore on  	NATION	 



