-
Notifications
You must be signed in to change notification settings - Fork 15
/
load-mysql-myisam.sql
26 lines (24 loc) · 1.28 KB
/
load-mysql-myisam.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CREATE TABLE LINEITEM
( L_ORDERKEY INTEGER NOT NULL,
L_PARTKEY INTEGER NOT NULL,
L_SUPPKEY INTEGER NOT NULL,
L_LINENUMBER INTEGER NOT NULL,
L_QUANTITY FLOAT NOT NULL,
L_EXTENDEDPRICE FLOAT NOT NULL,
L_DISCOUNT FLOAT NOT NULL,
L_TAX FLOAT NOT NULL,
L_RETURNFLAG CHAR(1) NOT NULL,
L_LINESTATUS CHAR(1) NOT NULL,
L_SHIPDATE DATE NOT NULL,
L_COMMITDATE DATE NOT NULL,
L_RECEIPTDATE DATE NOT NULL,
L_SHIPINSTRUCT CHAR(25) NOT NULL,
L_SHIPMODE CHAR(10) NOT NULL,
L_COMMENT VARCHAR(44) NOT NULL) ENGINE=MyISAM;
LOAD DATA LOCAL INFILE 'data/lineitem.tbl'
INTO TABLE LINEITEM FIELDS TERMINATED BY '|';
CREATE INDEX index_shipdate ON LINEITEM (L_SHIPDATE) USING BTREE;
CREATE INDEX index_commitdate ON LINEITEM (L_COMMITDATE) USING BTREE;
CREATE INDEX index_partkey ON LINEITEM (L_PARTKEY) USING BTREE;
CREATE INDEX index_shipmode ON LINEITEM (L_SHIPMODE) USING BTREE;
OPTIMIZE TABLE LINEITEM;