????1?????mySQL
????????: MySQL Server??
????????: MySQL Client?? MySQL Query Browser?? MySQL Navigator?? MySQL Administrator???????????????????????????
????2??????TPC-H
??????????°???2.14?????47MB.
????http://www.tpc.org/tpch/spec/tpch_2_14_0.zip
????3????????????
????4????????????????MySQL
????1) ?????????root??? 2)????MySQL???????????????   mysql -u root -p   mysql> CREATE USER 'tpch'@'%' IDENTIFIED BY 'tpch';   mysql> CREATE DATABASE tpch;   mysql> GRANT ALL ON tpch.* to 'tpch'@'%';   mysql> USE tpch;
????3)????tpch???μ?dss.ddl?????????tpch??????е??   mysql> . tpch/gen/dss.ddl
????4)?????tpch??????£???makefile???????????makefile?????????makefile???   shell> cp makefile.suite makefile   shell> vim makefile   makefile????????????д??   CC      = gcc
????# Current values for DATABASE are: INFORMIX?? DB2?? TDAT (Teradata)  #                                  SQLSERVER?? SYBASE  # Current values for MACHINE are:  ATT?? DOS?? HP?? IBM?? ICL?? MVS??   #                                  SGI?? SUN?? U2200?? VMS?? LINUX?? WIN32   #
????Current values for WORKLOAD are:  TPCH
????DATABASE= SQLSERVER
????MACHINE = LINUX
????WORKLOAD = TPCH
????5)???tpch.h???   ??????е?SQLSERVER?????   #ifdef  SQLSERVER   #define GEN_QUERY_PLAN        "EXPLAIN;"   #define START_TRAN                "START TRANSACTION; "   #define END_TRAN                "COMMIT; "   #define SET_OUTPUT                ""   #define SET_ROWCOUNT                "limit %d; "   #define SET_DBASE                "use %s; "   #endif
????6)???makefile   shell> make
????7)??????????????   shell> ./dbgen -s 1   -s ???????????1?1G????????
????8)???tpch???μ?dss.ri???   1.??? "CONNECT TO TPCD;"   2.??????е? "TPCH."(????и???)   3.??????е?"COMMIT WORK;"(??????????)
????9)???MySQL????????????????????MySQL   shell> mysql -u tpch -p   mysql> use tpch;   mysql> LOAD DATA LOCAL INFILE 'customer.tbl' INTO TABLE CUSTOMER FIELDS TERMINATED BY '|';   mysql> LOAD DATA LOCAL INFILE 'orders.tbl' INTO TABLE ORDERS FIELDS TERMINATED BY '|';   mysql> LOAD DATA LOCAL INFILE 'lineitem.tbl' INTO TABLE LINEITEM FIELDS TERMINATED BY '|';   mysql> LOAD DATA LOCAL INFILE 'nation.tbl' INTO TABLE NATION FIELDS TERMINATED BY '|';   mysql> LOAD DATA LOCAL INFILE 'partsupp.tbl' INTO TABLE PARTSUPP FIELDS TERMINATED BY '|';   mysql> LOAD DATA LOCAL INFILE 'part.tbl' INTO TABLE PART FIELDS TERMINATED BY '|';   mysql> LOAD DATA LOCAL INFILE 'region.tbl' INTO TABLE REGION FIELDS TERMINATED BY '|';   mysql> LOAD DATA LOCAL INFILE 'supplier.tbl' INTO TABLE SUPPLIER FIELDS TERMINATED BY '|';
????10)???tpch???μ?dss.ri   mysql> . dss.ri
????11)??????????????Сд???????????dss.ddl???????????д????????????????Сд   mysql> alter table NATION rename nation;   mysql> alter table SUPPLIER rename supplier;   mysql> alter table REGION rename region;   mysql> alter table PARTSUPP rename partsupp;   mysql> alter table PART rename part;   mysql> alter table ORDERS rename orders;   mysql> alter table LINEITEM rename lineitem;   mysql> alter table CUSTOMER rename customer;