zoukankan      html  css  js  c++  java
  • 校正oracle,mysql,hive,postgresql,greenplum 记录数分析命令

    oracle:

    analyze table TEST_ORACLE_PARTITION compute statistics; 
    

    mysql:

    1.从information_schema表中查询相关字段行数等信息

    select t.TABLE_NAME as `name`,t.TABLE_ROWS as `rows` 
    from information_schema.TABLES as t 
    where TABLE_SCHEMA=database()
    and t.TABLE_NAME in ('tableName')
    union all
    select 'tableName',count(1) from tableName;
    
    1. 用分析命令获取

      Analyze table tableName;

    hive:

    ## 只在HIVE中生效,SparkSQL中不生效 ##     ## 非ORC文件会触发MapReduce任务进行统计
    

    非分区表

    ANALYZE TABLE databasename.tablename COMPUTE STATISTICS;
    

    分区表

    ANALYZE TABLE databasename.tablename  PARTITION(day='20210825',source=400) COMPUTE STATISTICS;
    

    postgresql&greenplum:

    vacuum analyze ff.newtable;
  • 相关阅读:
    Civil3D有哪些API
    Android Dex分包之旅
    android 资料
    Android拆分与加载Dex的多种方案对比
    Android开机时间分析
    (3) arm 指令
    (2) arm 指令条件码
    (1) arm 指令格式
    Temp
    Android持续优化
  • 原文地址:https://www.cnblogs.com/txdblog/p/15204812.html
Copyright © 2011-2022 走看看