摘要:
一、百万级数据库优化方案1.对查询进行优化,要尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null最好不要给数据库留NULL,尽可能的使用 NOT NULL填充数据库.备注、描述、评论之... 阅读全文
posted @ 2017-07-19 11:20
ChavinKing
阅读(13403)
评论(0)
推荐(0)
摘要:
归档hive历史分区不会减少hdfs存储空间,但是可以有效减轻hadoop namenode的压力,尤其在于小文件比较多的情况下。 $mkdir $HIVE_HOME/auxlib $ cp /opt/cdh-5.3.6/hadoop-2.5.0/share/hadoop/tools/lib/had 阅读全文
posted @ 2017-07-16 20:42
ChavinKing
阅读(1472)
评论(0)
推荐(0)
摘要:
首先看一下hive cli工具对于变量的定义规定的几项功能: $ bin/hive -h usage: hive -d,--define <key=value> Variable subsitution to apply to hive commands. e.g. -d A=B or --defi 阅读全文
posted @ 2017-07-12 17:56
ChavinKing
阅读(2182)
评论(0)
推荐(0)
摘要:
分析函数又叫开窗函数,OLAP函数等,因为有人问我用过开窗函数没,呵,什么是开窗函数,从来没听过,难道是分析函数么。哈哈,最后还真是分析函数哦!用过的东西别名也应该知道,赶上这么个事,就剽窃一眼Oracle官档,另外借鉴网友的例子,整理了以下这篇文档,供大家参考。 一、分析函数列表 SUM:该函数计 阅读全文
posted @ 2017-07-11 16:30
ChavinKing
阅读(1969)
评论(0)
推荐(0)
摘要:
准备工作: CentOS 7安装docker: #yum -y install docker 1、获取节点所需镜像 --主机执行 #docker pull django #docker pull haproxy #docker pull redis # docker images REPOSITOR 阅读全文
posted @ 2017-07-06 22:26
ChavinKing
阅读(2882)
评论(0)
推荐(1)
摘要:
hive仓库位置由以下参数决定,默认位置/user/hive/warehouse: <property> <name>hive.metastore.warehouse.dir</name> <value>/user/hive/warehouse</value> </property> hive中元数 阅读全文
posted @ 2017-07-04 18:13
ChavinKing
阅读(518)
评论(0)
推荐(0)
摘要:
hive启动hwi: ./hive --service hwi ls: cannot access /opt/cdh-5.3.6/hive-0.13.1/lib/hive-hwi-*.war: No such file or directory 17/05/12 09:29:47 INFO hwi. 阅读全文
posted @ 2017-07-04 17:49
ChavinKing
阅读(864)
评论(0)
推荐(0)
摘要:
统计文件信息: $ /opt/cdh-5.3.6/hadoop-2.5.0/bin/hdfs dfs -text /user/hadoop/wordcount/input/wc.input hadoop spark spark hadoop oracle mysql postgresql postg 阅读全文
posted @ 2017-07-04 12:39
ChavinKing
阅读(3633)
评论(0)
推荐(0)
浙公网安备 33010602011771号