zoukankan      html  css  js  c++  java
  • 【TPCDS】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.如果文中有什么错误,欢迎指出。以免更多的人被误导。
  • 相关阅读:
    Lambda表达式、依赖倒置
    ASP.NET vNext 概述
    Uname
    RHEL4 i386下安装rdesktop【原创】
    Taxonomy of class loader problems encountered when using Jakarta Commons Logging(转)
    How to decompile class file in Java and Eclipse
    先有的资源,能看的速度看,不能看的,抽时间看。说不定那天就真的打不开了(转)
    Google App Engine 学习和实践
    【VBA研究】VBA通过HTTP协议实现邮件轨迹跟踪查询
    js正則表達式语法
  • 原文地址:https://www.cnblogs.com/syw20170419/p/15593685.html
Copyright © 2011-2022 走看看