Oracle SQL theory

本文介绍SQL语句在数据库中的解析流程,包括软解析和硬解析的区别,以及数据的逻辑读取与物理读取过程。此外还讨论了不同类型的查询执行策略。
v$sql contains SQL statements cached in 'Library Cache' in 'System Global Area(SGA)'.
Soft parse - the SQL statement is already found in the library cache by hashing.
Hard parse - the SQL statement is not in the library cache, need parse the SQL, genereate the execution plan, update the library cache (need acquire the 'Latches (like spin lock)' to exculsivly update the lib cache area).
Logic read - if the data is already in the SGA.
Physical read - if the data is not in the SGA, need access physical disk to get the data and then update SGA if necessary (again need hold the Latches when updating the SGA).
 
Nested Loops (Usually Good) -
Filter (Usually Bad) -
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值