当前位置:网站首页>Oracle数据库 SQL语句执行计划、语句跟踪与优化实例
Oracle数据库 SQL语句执行计划、语句跟踪与优化实例
2022-07-03 09:09:00 【drhrht】
如何发现最消耗系统资源的SQL语句呢 利用I/O优化鉴定耗费资源的方法即AWR报告,即可使之变得很容易。
当确定了一个最有可能出问题的 SQL 语句后,接下来就是如何追踪这一语句的执行,最普遍的方法就是找出该SQL语句的执行计划。
随着数据库中数据的增加,系统的响应速度就成为目前系统需要解决的主要问题之一,系统优化中一个很重要的方面就是SQL语句的优化。
大量的数据指出劣质的SQL语句和优质的SQL语句之间的速度差别可以达到上百倍,对一个系统不是简单的能实现功能就可以,而是要写出高质量的SQL语句提高系统的可用性。
01、 利用autotrace追踪SQL语句
利用autotrace追踪SQL语句的代码如下:
SQL> set autotrace on
SQL> select * from dual;
D
-
X
执行计划
----------------------------------------------------------
Plan hash value: 272002086
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 2 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS
边栏推荐
- Vscode Arduino installation Library
- QT qstring:: number apply base conversion
- LeetCode每日一题(985. Sum of Even Numbers After Queries)
- 顺利毕业[2]-学生健康管理系统 功能开发中。。。
- All processes of top ten management in project management
- Leetcode daily question (1362. closest divisors)
- Flink learning notes (10) Flink fault tolerance mechanism
- Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 4 --blinker_ DHT_ WiFi (lighting technology app control + temperature and humidity data app display)
- Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 2 --blinker_ Hello_ WiFi (lighting technology - Mobile App control routine)
- Qt QComboBox QSS样式设置
猜你喜欢
UCI and data multiplexing are transmitted on Pusch - Part I
Definition and use of enum in C language
The cyclic shift of PUCCH in NR channel is generated by MATLAB
【22毕业季】我是毕业生yo~
Hudi quick experience (including detailed operation steps and screenshots)
[CSDN] C1 training problem analysis_ Part IV_ Advanced web
Shell logic case
Nr-prach:prach format and time-frequency domain
【男保姆式】教你打开第一个微信小程序
Development of fire power monitoring system
随机推荐
307. Range Sum Query - Mutable
numpy. Reshape() and resize() functions
Convert IP address to int
Common software open source protocols
数字身份验证服务商ADVANCE.AI顺利加入深跨协 推进跨境电商行业可持续性发展
Flink learning notes (VIII) multi stream conversion
Please tell me how to set vscode
Jestson Nano 从tftp服务器下载更新kernel和dtb
Leetcode daily question (1362. closest divisors)
Fundamentals of Electronic Technology (III)__ Chapter 1 resistance of parallel circuit
Send mail using WP mail SMTP plug-in
全球KYC服务商ADVANCE.AI 活体检测产品通过ISO国际安全认证 产品能力再上一新台阶
Electronic product design, MCU development, circuit cloning
Leetcode daily question (2232. minimize result by addressing parents to expression)
Nodemcu-esp8266 development board to build Arduino ide development environment
CEF下载,编译工程
[CSDN] C1 training problem analysis_ Part III_ JS Foundation
LeetCode每日一题(2115. Find All Possible Recipes from Given Supplies)
Construction and test of TFTP server under unbuntu (Debian)
[successful graduation] [1] - visit [student management information system]