oracle中union和union all的查询速度
来源:互联网 发布:抠图软件 mac版 编辑:程序博客网 时间:2024/06/15 02:05
一、首先先准备一张数据相对多的表
select count(1) from STUDENT_EXAM_RESULT
可以看出数据有六十多万数据,下面我们开始进行测试
1、union执行的查询
select s.student_exam_result_id from STUDENT_EXAM_RESULT sunion
select s.student_exam_result_id from STUDENT_EXAM_RESULT s
执行如下
可以看出 12 row selected in 1.139 second ,
执行多次之后,平均速度均在一秒之上。
2、union执行的查询如下
select s.student_exam_result_id from STUDENT_EXAM_RESULT s
union all
select s.student_exam_result_id from STUDENT_EXAM_RESULT s
下面执行结果
12 row selected in 0.031 seconds
执行多次 平均速度均在0.03秒之上
结论:通过以上的执行可以看出union all执行速度 要比 union执行速度快 n倍之上
阅读全文
0 0
- oracle中union和union all的查询速度
- oracle中 union和union all
- Oracle中union 和 union all 的区别解析
- Oracle中 union和union all的区别
- Oracle中union、union all、minus和intersect的区别
- Oracle中union和union all的区别
- Oracle中 union 和 union all 的区别
- oracle union 和union all 的区别
- Oracle 合并查询union、union all、intersect和minus
- 常用SQL查询语句 Oracle中Union,Union All,Intersect,Minus的有什么区别
- oracle中Union,Union All,Intersect和Minus操作异同
- oracle中union和union all区别与性能分析
- 组合查询中union 与union all的区别
- Mysql联合查询UNION和UNION ALL的使用介绍
- Mysql联合查询UNION和UNION ALL的使用介绍
- 数据库查询优化(使用union 和 union all 的区别)
- Mysql联合查询UNION和UNION ALL的使用介绍
- Mysql联合查询UNION和UNION ALL的使用介绍
- 批量读取文本文件并生成自己的肖像词云
- 能返回最大值的栈
- 04:带余除法
- SQL Server 扩展属性
- 《C++ Primer》第五版课后习题解答_第四章(1)(01-20)
- oracle中union和union all的查询速度
- javascript中toFixed()方法详解
- 微信小程序为教育行业带来哪些新思考?
- Windows环境变量Path、ClassPath、JAVA_HOME的作用
- 了解 JavaScript 中的内置对象
- 1676:单词个数统计
- 三种方式查看Java类字节码
- Spark最新的两大研发方向深度学习和结构化流处理
- 数字转大写