Home » RDBMS Server » Performance Tuning » plz help me
plz help me [message #182823] |
Tue, 18 July 2006 05:51  |
bagulia_pilla
Messages: 25 Registered: July 2006
|
Junior Member |
|
|
I need to optimise this query.
so I need some advice.. thanks in advance.
SELECT notificationid, a.status, notificationrefno,
(SELECT COUNT (*)
FROM company com
WHERE a.forcompanyid = com.parentcompanyid) AS parentindicator,
c.companyname AS companyname, transactionid, refamount, refcurrency,
notificationdate, foruserid, forgroupid, forcompanyid,
notificationheader, notificationmessage, bankaccountid,
b.notificationtypeid, notificationtype, description, replyreq,
trxtype, CATEGORY,
DECODE (CATEGORY, 'System', '1', CATEGORY) catorder
FROM notification a,
notificationtype b,
company c
WHERE (formatcode NOT LIKE 'Z%' OR formatcode IS NULL)
AND (bankaccountid IN (NULL, 90030327000475))
AND a.deleted IS NULL
AND UPPER (a.forcompanyid) = c.companyid
AND c.parentcompanyid = 20030408000466
AND a.notificationtypeid = b.notificationtypeid
ORDER BY parentindicator DESC,
companyname ASC,
catorder ASC,
notificationdate DESC
|
|
|
|
|
Goto Forum:
Current Time: Fri May 02 15:08:39 CDT 2025
|