Result cache latch contention
Date: Thu, 28 May 2020 15:52:35 +1000
Message-ID: <CAFeFPA8zNAmhY0T432evbWoU+uV5QeE6=rW3_c_Jr+yvOq+WYA_at_mail.gmail.com>
Hi
During certain workloads we run into latch contention on the result cache
[image: image.png]
This was from a 20 minute AWR report.
select inst_id, namespace, status, name, cache_id,
count(*) number_of_results,
round(avg(scan_count)) avg_scan_cnt,
round(max(scan_count)) max_scan_cnt,
round(sum(block_count)) tot_blk_cnt
from gv$result_cache_objects
where type = 'Result'
group by inst_id, namespace, name, status, cache_id
having round(sum(block_count)) > 10
order by tot_blk_cnt desc;
select inst_id, substr(name, 1,100) name,
cache_id,
count(*) result_count,
round(avg(scan_count)) avg_scan_count,type,status
from gv$result_cache_objects
where type = 'Result'
group by inst_id, name, cache_id,type,status
having count(*) > 10
order by 4 desc;
select inst_id, namespace, status, name, cache_id,
count(*) number_of_results,
round(avg(scan_count)) avg_scan_cnt,
round(max(scan_count)) max_scan_cnt,
round(sum(block_count)) tot_blk_cnt
from gv$result_cache_objects
where type = 'Result'
group by inst_id, namespace, name, status, cache_id
having round(sum(block_count)) > 10
order by tot_blk_cnt desc;
Can anyone explain the relationship between SQL, cache_id and how to identify the bad cache_id...
I can simply pick the top x id's and blacklist them, but like to do this a bit more scientifically
Jack van Zanen
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Thank you for your cooperation
-- http://www.freelists.org/webpage/oracle-lReceived on Thu May 28 2020 - 07:52:35 CEST
- image/png attachment: image.png