openGauss2.1.0 TPC-C数据导入
一、下载tpch测试数据
- 使用普通用户如omm登录服务器
- 执行如下命令下载测试数据库:
git clone https://gitee.com/xzp-blog/tpch-kit.git
二、导入测试数据
- 进入dbgen目录下,生成makefile文件:
cd /opt/software/tpch-kit/dbgen/ make -f Makefile - 连接openGauss数据库,创建tpch的database:
gsql -d postgres -p 5432 -r openGauss=# CREATE DATABASE tpch; openGauss=# \q - 创建对象8张测试表,执行如下命令:
执行完成后,登录数据库查看,会看到如下8张表:cd /opt/software/tpch-kit/dbgen gsql -d tpch -f dss.ddlList of relations Schema | Name | Type | Owner | Storage --------+----------+-------+-------+---------------------------------- public | customer | table | omm | {orientation=row,compression=no} public | lineitem | table | omm | {orientation=row,compression=no} public | nation | table | omm | {orientation=row

本文详细介绍了如何在openGauss2.1.0版本中下载和导入TPC-C测试数据,包括下载测试数据库、生成makefile、创建表、导入数据以及生成查询语句的过程。

1196

被折叠的 条评论
为什么被折叠?



