Print Thread
Help with SQL Monitor for long running query
#62477 03/29/21 10:04 PM
Joined: Jan 2015
Posts: 8
Philadelphia USA
Z
Member
OP Offline
Member
Z
Joined: Jan 2015
Posts: 8
Philadelphia USA
I have a query that took a very long time. The picture shows information from PLSD SQL Monitor. I'm not sure how to interpret it though. Thanks for your help.
[img]https://photos.app.goo.gl/FDYfW2BCygQw3MK57[/img]

Re: Help with SQL Monitor for long running query
zstringer #62482 04/04/21 03:40 PM
Joined: Sep 2003
Posts: 387
London, UK
Member
Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
It's not the PL/SQL Developer SQL Monitor, it's Oracle's. From the image, it looks like the optimiser underestimated the number of rows for each step and therefore chose a Merge Join Cartesian and nested loops, which didn't scale well for the actual number of rows you have. I'd guess the problems started when it estimated one row for RTS_ABCD_STRATIFIED when there are actually 413. Gathering stats on that table, and maybe the others, or maybe the whole schema, might fix it. It could be worth exploring the reason why they were so far off.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.041s Queries: 14 (0.007s) Memory: 2.4998 MB (Peak: 3.0426 MB) Data Comp: Off Server Time: 2024-05-20 18:56:37 UTC
Valid HTML 5 and Valid CSS