Database Tuning (MOSC)

MOSC Banner

scalar subquery

edited Jul 31, 2023 11:12AM in Database Tuning (MOSC) 1 commentAnswered

Hi Experts,

Our database version 19.17

We need your guidance if the attached sql query can be tuned furthur. Currently,it takes 5 minutes to complete. Attached tkprof output and execution plan along with index stats.

Problem is with high CPU consumption. Query executed 11985 times for each and every record. Is there any option to reduce the number of executions.

SQL> select count(*) from AP_INVOICES_ALL;

 COUNT(*)

----------

  1123264


SQL> select count(*) from AP_BATCHES_ALL;

 COUNT(*)

----------

  307099


Thanks,

SG


Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center