Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Slow Query
Hello,
The following query is performing poorly in the app. I have tried the scalar subquery approach (using formatted to_char) with no luck. any help would be appreciated.
SELECT MP_NO, MP_DESC, MP_ACTIVE AS "FLAG_YES_NO",
(
( SELECT COUNT(*) FROM ST, STINV
WHERE ST.ST_ID = STINV.ST_ID AND ST.ST_POSTED IS NOT NULL AND STINV.MP_NO = MPT.MP_NO )
WHERE PT.PT_ID = PTINV.PT_ID AND PT.PT_POSTED IS NOT NULL AND PTINV.MP_NO = MPT.MP_NO )
![]() |
![]() |