【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();执行后的示例如下所示:

1.作者:Syw 2.出处:http://www.cnblogs.com/syw20170419/ 3.本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 4.如果文中有什么错误,欢迎指出。以免更多的人被误导。 |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?