【TPC-DS】trino+S3+hive+postgresql性能测试----脚本批量插入数据的方式(七)

cd /root/trino/trino-server-363/
./trino --server 10.201.0.125:8080 --catalog hive --schema tpcds -f /root/trino/tpcds-kit/TpcdsData/script/insert_data.sql
【重要说明】
  • --server:修改为自己的IP地址
  • --schema:数据库名称
  • insert_data.sql:改为自己存放如下SQL脚本的文件名称与路径
 
SQL脚本:
复制代码
select now();
insert into postgresql.public.call_center select * from hive.tpcds.call_center;
select now();
insert into postgresql.public.catalog_page select * from hive.tpcds.catalog_page;
select now();
insert into postgresql.public.catalog_returns select * from hive.tpcds.catalog_returns;
select now();
insert into postgresql.public.catalog_sales select * from hive.tpcds.catalog_sales;
select now();
insert into postgresql.public.customer_address select * from hive.tpcds.customer_address;
select now();
insert into postgresql.public.customer select * from hive.tpcds.customer;
select now();
insert into postgresql.public.customer_demographics select * from hive.tpcds.customer_demographics;
select now();
insert into postgresql.public.date_dim select * from hive.tpcds.date_dim;
select now();
insert into postgresql.public.household_demographics select * from hive.tpcds.household_demographics;
select now();
insert into postgresql.public.income_band select * from hive.tpcds.income_band;
select now();
insert into postgresql.public.inventory select * from hive.tpcds.inventory;
select now();
insert into postgresql.public.item select * from hive.tpcds.item;
select now();
insert into postgresql.public.promotion select * from hive.tpcds.promotion;
select now();
insert into postgresql.public.reason select * from hive.tpcds.reason;
select now();
insert into postgresql.public.ship_mode select * from hive.tpcds.ship_mode;
select now();
insert into postgresql.public.store select * from hive.tpcds.store;
select now();
insert into postgresql.public.store_returns select * from hive.tpcds.store_returns;
select now();
insert into postgresql.public.store_sales select * from hive.tpcds.store_sales;
select now();
insert into postgresql.public.time_dim select * from hive.tpcds.time_dim;
select now();
insert into postgresql.public.warehouse select * from hive.tpcds.warehouse;
select now();
insert into postgresql.public.web_page select * from hive.tpcds.web_page;
select now();
insert into postgresql.public.web_returns select * from hive.tpcds.web_returns;
select now();
insert into postgresql.public.web_sales select * from hive.tpcds.web_sales;
select now();
insert into postgresql.public.web_site select * from hive.tpcds.web_site;
select now();
复制代码
 
【重要说明】
insert每插入一条SQL要记录它的插入时间,因此添加select now();执行后的示例如下所示:
 

posted @   Syw_文  阅读(250)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示