Welcome Guest ( Log In | Register )



Performance Tuning Reference poster
Oracle training in Linux 

Oracle training Weblogic Book
Easy Oracle Jumpstart
Oracle training & performance tuning books
Burleson Consulting Remote DB Administration
Reply to this topicStart new topic
> CPU and Memory Utilization of a Query
post Aug 15 2017, 05:39 AM
Post #1


Group: Members
Posts: 1
Joined: 15-August 17
Member No.: 52,117

Hi all

Assuming I execute a query like the one below in Oracle;

SELECT t1.check_in,t1.check_out, t1.room_id,t2.room_name
FROM mydb.reservation_tb as t1
LEFT JOIN mydb.rooms_tb as t2 on t1.room_id = t2.room_id
WHERE t1.check_in = '2012-08-01' and t1.check_out = '2012-08-08' and t1.room_id = 12

I want to know if there is a way I can determine the following:

1. The percentage of CPU that was utilized by this query when it was executed.

2. The Amount of Memory utilized by this query when it was executed
Go to the top of the page
+Quote Post
post Aug 15 2017, 06:12 AM
Post #2

Advanced Member

Group: Members
Posts: 13,529
Joined: 26-January 04
Member No.: 13

Hi selorm, and welcome to the forum!

Oracle is not well instrumented to track PGA usage at the query level.

However, if the database is idle with only your query running, then you can infer usage at the system level:


Here is how to see the memory usage for a session:


The v$sqlarea view shows the CPU for specific SQL statements:


Good luck!

Hope this helps . . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


Lo-Fi Version Time is now: 22nd September 2017 - 05:20 PM