单表查询优化:(关于索引,后面再开单章讲解) (0)可以先使用 EXPLAIN 关键字可以让你知道MySQL是如何处理你的SQL语句的。这可以帮我们分析是查询语句或是表结构的性能瓶颈。 (1)写sql要明确需要的字段,要多少就写多少字段,而不是滥用 select * (2)可以用使用连接(JOIN) ...
分类:
数据库 时间:
2017-11-11 14:47:29
阅读次数:
185
1. Understand the major trends driving the rise of deep learning.2. Be able to explain how deep learning is applied to supervised learning.3. Understa ...
分类:
其他好文 时间:
2017-11-09 19:36:07
阅读次数:
133
This lesson introduces the --strictNullChecks compiler option and explains how non-nullable types differ from nullable types. It also illustrates how ...
分类:
其他好文 时间:
2017-11-08 20:11:21
阅读次数:
137
git中Please enter a commit message to explain why this merge is necessary. Please enter a commit message to explain why this merge is necessary. 请输入提交消 ...
分类:
其他好文 时间:
2017-11-08 17:36:18
阅读次数:
127
1.SQL前面加 EXPLAIN 定位到sql级别 各个属性的含义 id select查询的序列号 select_type select查询的类型,主要是区别普通查询和联合查询、子查询之类的复杂查询。 table 输出的行所引用的表。 type 联合查询所使用的类型。 type显示的是访问类型,是较 ...
分类:
数据库 时间:
2017-11-08 12:02:37
阅读次数:
269
题目描述 给定一个double类型的浮点数base和int类型的整数exponent。求base的exponent次方。 思路: 使用递归,时间复杂度O(logn) 当n为偶数,a^n =(a^n/2)*(a^n/2) 当n为奇数,a^n = a^[(n-1)/2] * a^[(n-1)/2] * ...
分类:
其他好文 时间:
2017-11-06 11:24:40
阅读次数:
132
1、 监控网站数据库负载。 2、 "explain"所有的SQL语句。 3、 缓存所有能缓存的东西。 4、 归档好代码。 硬件方面: 先要找出瓶颈在哪个部分:是CPU负荷太高(经常100%),还是内存不够用(大量使用虚拟内存),还是磁盘I/O性能跟不上(硬盘指示灯狂闪)?这几个都是可以通过升级硬件来... ...
分类:
Web程序 时间:
2017-11-03 20:29:53
阅读次数:
152
查看Mysql执行计划 使用navicat查看mysql执行计划: 打开profile分析工具: 查看是否生效:show variable like ‘%profil%’; 查看进程:show processlist; 选择数据库:use db_jiakao; 全部分析的类型:show PROFIL ...
分类:
数据库 时间:
2017-11-03 00:21:05
阅读次数:
231
Hive对于表的操作大部分都是转换为MR作业的形式,为了提高OLAP[online analysis process 在线分析处理]的效率,Hive自身给出了很多的优化策略 1. explain[解释执行计划] 通过explain命令,可以查看Hive语句的操作情况,是否为慢查询,是否走索引,一目了 ...
分类:
其他好文 时间:
2017-11-02 15:52:00
阅读次数:
229
转自:http://blog.itpub.net/35489/viewspace-764856/ 1. sql 详细执行计划,主要检查驱动路径,索引是否合适;同一个pl/sql窗口连续执行即可;explain plan for (select * from HW_PC_SIGNED_COMPANY_ ...
分类:
数据库 时间:
2017-10-31 20:17:57
阅读次数:
283