|
[root@redflag11012501 ~]# /usr/bin/mysql-ib tpch2 </user1/app/oradata/tmp/dss.ddl
[root@redflag11012501 ~]# /usr/bin/mysql-ib tpch2
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.40-log build number (revision)=IB_3.4.2_DPN128_9237(iee_eval - commercial)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show tables;
+-----------------+
| Tables_in_tpch2 |
+-----------------+
| CUSTOMER |
| LINEITEM |
| NATION |
| ORDERS |
| PART |
| PARTSUPP |
| REGION |
| SUPPLIER |
+-----------------+
8 rows in set (0.04 sec)
mysql> show create table nation;
ERROR 1146 (42S02): Table 'tpch2.nation' doesn't exist
mysql> show create table NATION;
+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| NATION | CREATE TABLE `NATION` (
`N_NATIONKEY` int(11) NOT NULL,
`N_NAME` char(25) COLLATE latin1_bin NOT NULL,
`N_REGIONKEY` int(11) NOT NULL,
`N_COMMENT` varchar(152) COLLATE latin1_bin DEFAULT NULL
) ENGINE=BRIGHTHOUSE DEFAULT CHARSET=latin1 COLLATE=latin1_bin |
+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> set @BH_DATAFORMAT='txt_variable';
Query OK, 0 rows affected (0.00 sec)
mysql> load data infile '/user1/app/oradata/tpch2/lineitem.tbl' into table LINEITEM fields terminated by '|' lines terminated by '|\r\n';
Query OK, 59986052 rows affected (6 min 16.33 sec)
Records: 59986052 Deleted: 0 Skipped: 0 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.01 sec)
mysql> load data infile '/user1/app/oradata/tpch2/part.tbl' into table PART fields terminated by '|' lines terminated by '|\r\n';
Query OK, 2000000 rows affected (10.59 sec)
Records: 2000000 Deleted: 0 Skipped: 0 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> set autocommit=0;
Query OK, 0 rows affected (0.00 sec)
mysql> load data infile '/user1/app/oradata/tpch2/partsupp.tbl' into table PARTSUPP fields terminated by '|' lines terminated by '|\r\n';
Query OK, 8000000 rows affected (45.43 sec)
Records: 8000000 Deleted: 0 Skipped: 0 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.01 sec)
mysql> load data infile '/user1/app/oradata/tpch2/customer.tbl' into table CUSTOMER fields terminated by '|' lines terminated by '|\r\n';
Query OK, 1500000 rows affected (13.05 sec)
Records: 1500000 Deleted: 0 Skipped: 0 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.01 sec)
mysql> load data infile '/user1/app/oradata/tpch2/customer.tbl' into table CUSTOMER fields terminated by '|' lines terminated by '|\r\n';
Query OK, 1500000 rows affected (14.02 sec)
Records: 1500000 Deleted: 0 Skipped: 0 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.01 sec)
mysql> load data infile '/user1/app/oradata/tpch2/supplier.tbl' into table SUPPLIER fields terminated by '|' lines terminated by '|\r\n';
Query OK, 100000 rows affected (2.39 sec)
Records: 100000 Deleted: 0 Skipped: 0 Warnings: 0
mysql> load data infile '/user1/app/oradata/tpch2/nation.tbl' into table NATION fields terminated by '|' lines terminated by '|\r\n';
Query OK, 25 rows affected (0.08 sec)
Records: 25 Deleted: 0 Skipped: 0 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.01 sec)
mysql> load data infile '/user1/app/oradata/tpch2/region.tbl' into table REGION fields terminated by '|' lines terminated by '|\r\n';
Query OK, 5 rows affected (0.08 sec)
Records: 5 Deleted: 0 Skipped: 0 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.01 sec)
18Cload data infile '/user1/app/oradata/tpch2/orders.tbl' into table ORDERS fields terminated by '|' lines terminated by '|\r\n';
Query OK, 15000000 rows affected (1 min 11.93 sec)
Records: 15000000 Deleted: 0 Skipped: 0 Warnings: 0
18Ccommit;
Query OK, 0 rows affected (0.01 sec)
18Cselect count(*) from customer;
ERROR 1146 (42S02): Table 'tpch2.customer' doesn't exist
18Cselect count(*) from CUSTOMER;
+----------+
| count(*) |
+----------+
| 3000000 |
+----------+
1 row in set (0.00 sec)
18Cdrop table CUSTOMER;
Query OK, 0 rows affected (0.05 sec)
18CCREATE TABLE CUSTOMER ( C_CUSTKEY INTEGER NOT NULL,
-> C_NAME VARCHAR(25) NOT NULL,
-> C_ADDRESS VARCHAR(40) NOT NULL,
-> C_NATIONKEY INTEGER NOT NULL,
-> C_PHONE CHAR(15) NOT NULL,
-> C_ACCTBAL DECIMAL(15,2) NOT NULL,
-> C_MKTSEGMENT CHAR(10) NOT NULL,
-> C_COMMENT VARCHAR(117) NOT NULL);
Query OK, 0 rows affected (0.02 sec)
18Cload data infile '/user1/app/oradata/tpch2/customer.tbl' into table CUSTOMER fields terminated by '|' lines terminated by '|\r\n';
Query OK, 1500000 rows affected (12.72 sec)
Records: 1500000 Deleted: 0 Skipped: 0 Warnings: 0
18Ccommit;
Query OK, 0 rows affected (0.00 sec)
18Cexit
Bye
[root@redflag11012501 ~]# du --max-depth=1 -h /user1/app/oradata/data
du: 无法访问 “/user1/app/oradata/data”: 没有那个文件或目录
[root@redflag11012501 ~]# du --max-depth=1 -h /user1/app/data
4.0K /user1/app/data/test
968K /user1/app/data/mysql
1.9G /user1/app/data/tpch2
1.1G /user1/app/data/ssb2
176M /user1/app/data/tpch
105M /user1/app/data/ssb
8.8M /user1/app/data/BH_RSI_Repository
3.2G /user1/app/data
[root@redflag11012501 ~]# /usr/bin/mysql-ib tpch2
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.1.40-log build number (revision)=IB_3.4.2_DPN128_9237(iee_eval - commercial)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> source /user1/app/oradata/tpch_fix_up.sql
PROMPT set to '1'
+--------------+--------------+--------------+------------------+--------------------+------------------+-----------+--------------+----------+-------------+
| L_RETURNFLAG | L_LINESTATUS | SUM_QTY | SUM_BASE_PRICE | SUM_DISC_PRICE | SUM_CHARGE | AVG_QTY | AVG_PRICE | AVG_DISC | COUNT_ORDER |
+--------------+--------------+--------------+------------------+--------------------+------------------+-----------+--------------+----------+-------------+
| A | F | 377518399.00 | 566065727797.25 | 537759104278.0656 | 559276670892.11 | 25.500975 | 38237.151009 | 0.050007 | 14804077 |
| N | F | 9851614.00 | 14767438399.17 | 14028805792.2114 | 14590490998.36 | 25.522448 | 38257.810660 | 0.049973 | 385998 |
| N | O | 733123780.00 | 1099304906498.07 | 1044335077295.6306 | 1086120726300.93 | 25.497525 | 38233.044635 | 0.049999 | 28752743 |
| R | F | 377732830.00 | 566431054976.00 | 538110922664.7677 | 559634780885.08 | 25.508385 | 38251.219274 | 0.049997 | 14808183 |
+--------------+--------------+--------------+------------------+--------------------+------------------+-----------+--------------+----------+-------------+
4 rows in set (3 min 40.31 sec) |
|