问题描述
从包含10m条记录的数据库中检索信息需要多少时间,并且该表包含四列
专家解答
这是一个非常松散的问题,因为它取决于很多事情 .... 但这里有一个简单的例子是在一台3岁的笔记本电脑上完成的
SQL> create table t 2 as select rownum x1,rownum x2,rownum x3,rownum x4 3 from ( select 1 from dual connect by level <= 10000 ), 4 ( select 1 from dual connect by level <= 1000 ); Table created. -- scanning but not fetching all the rows SQL> SQL> SQL> set timing on SQL> select max(x1) from t; MAX(X1) ---------- 10000000 Elapsed: 00:00:00.72 -- fetching every row back to the calling environment SQL> set timing on SQL> begin 2 for i in ( select * from t ) 3 loop 4 null; 5 end loop; 6 end; 7 / PL/SQL procedure successfully completed. Elapsed: 00:00:11.45复制
文章转载自ASKTOM,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
786次阅读
2025-04-18 14:18:38
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
664次阅读
2025-04-15 17:24:06
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
591次阅读
2025-04-20 10:07:02
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
548次阅读
2025-04-22 00:13:51
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
532次阅读
2025-04-17 17:02:24
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
510次阅读
2025-04-22 00:20:37
一页概览:Oracle GoldenGate
甲骨文云技术
496次阅读
2025-04-30 12:17:56
火焰图--分析复杂SQL执行计划的利器
听见风的声音
470次阅读
2025-04-17 09:30:30
OR+DBLINK的关联SQL优化思路
布衣
382次阅读
2025-05-05 19:28:36
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
382次阅读
2025-04-15 14:48:05