Oracle的强大之处就在于他能总帮助让你选择正确的执行计划,即使你给了它错误的指示。
实验:
1. 创建测试表:
收集统计信息:
创建B树索引:
2. 执行select id from tbl_plan;查看它的执行计划:
因为创建了B树索引,正常讲可以从索引中获得id的值,不用全表扫描,但这里使用了全表扫描的方式。
即使使用...
分类:
数据库 时间:
2014-10-30 10:23:31
阅读次数:
270
(1) OOP and Design Patterns(1.1) Please explain difference among class, interface and abstract class. When you would use it rather than other?FeatureI...
分类:
其他好文 时间:
2014-10-29 19:16:24
阅读次数:
160
Fun with layers这篇文章的有些内容很奇怪,我根本就没有这种现象,所以暂时就这样吧In this post, I’ll explain how to add a border, rounded corners, and drop shadow to any UIView using so...
分类:
其他好文 时间:
2014-10-29 14:27:27
阅读次数:
273
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
分类:
其他好文 时间:
2014-10-29 12:44:21
阅读次数:
171
今天做一个订单任务, 其中需要查有无此订单号信息, 由于订单号是个列表, 所以想检测下如下语句的性能(主要在LIMIT 1上)"订单号 IN (订单号列表)" LIMIT 1然后就复习了下EXPLAIN的用法:explain显示了mysql如何使用索引来处理select语句以及连接表。可以帮助选择更...
分类:
数据库 时间:
2014-10-28 13:29:04
阅读次数:
234
Variables are a fundamental building block of all programming languages. In this lesson, I'll describe briefly what a variable is, explain the basic r...
分类:
其他好文 时间:
2014-10-28 09:21:40
阅读次数:
253
I explain what you need to start working with PHP. Before doing so, I think it'll be useful to explain what PHP is and how it works. PHP stands for PH...
分类:
Web程序 时间:
2014-10-28 09:18:03
阅读次数:
276
Before getting down to to the business of writing some real PHP, I want to take a few minutes to explain some basics. PHP needs to be processed by the...
分类:
Web程序 时间:
2014-10-28 09:15:05
阅读次数:
314
上一篇博客讲了可以使用慢查询日志定位耗时sql,使用explain命令查看mysql的执行计划,以及使用profiling工具查看语句执行真正耗时的地方,当定位了耗时之后怎样优化呢?这篇博客会介绍mysql中最简单快速的优化方法——添加索引。一、索引的添加 ...
分类:
数据库 时间:
2014-10-28 09:13:29
阅读次数:
247
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.//数字或字母For example,"A man, a plan, a cana...
分类:
其他好文 时间:
2014-10-27 20:55:25
阅读次数:
178