zoukankan      html  css  js  c++  java
  • hive分区表

    分区表创建

    row format delimited fields terminated by ',';指明以逗号作为分隔符

     

    依靠插入表创建分区表  从表sample_table选择 满足分区条件的 列插入到分区表中

    insert into table partition_table partition(gender='M') select id,name from sample_table where gender='M';
    insert into table partition_table partition(gender='F') select id,name from sample_table where gender='F';

    explain可以查看执行计划

    $ explain select *from sample_table where gender = 'M';

    $ explain select *from partition_table where gender = 'M';

  • 相关阅读:
    活动安排
    中国剩余定理
    欧拉回路
    单词游戏
    Ant Trip
    John's Trip
    太鼓达人
    相框
    原始生物
    Blockade
  • 原文地址:https://www.cnblogs.com/ggzhangxiaochao/p/9220775.html
Copyright © 2011-2022 走看看