Home » RDBMS Server » Performance Tuning » optimizing query - taking way too long to run
optimizing query - taking way too long to run [message #64851] |
Thu, 19 February 2004 06:33 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Rabeeha Khan
Messages: 11 Registered: May 2003
|
Junior Member |
|
|
-
any help on optimizing this query:
SELECT pp.function_name, pp.function_code, pp.function_uri, pp.time_out, h.*
FROM EPAGE_URI_TEST pp,
(SELECT pu.function_id, COUNT(1) numhits,
AVG(n.load_time) avgtime,
MAX(n.load_time) maxtime, MIN(n.load_time) mintime,
SUM(DECODE(SIGN(n.load_time - 10000), 1, 1, 0, 1, 0)) cnt_over10,
ROUND(100 * SUM(DECODE(SIGN(n.load_time - 10000), 1, 1, 0, 1, 0))/COUNT(1)) pct_over10,
SUM(DECODE(SIGN(n.load_time - 10000), -1, 1, 0)) cnt_under10,
SUM(DECODE(n.status_code, 204, 1, 0)) stat_204_cnt
FROM ltu_prod.LL_COMP_PAGE_NUGGET_HIT_TEST n, EPAGE_URI_TEST pu
WHERE n.function_id = pu.function_id
AND n.timestamp > SYSDATE - 30
GROUP BY pu.function_id) h
WHERE pp.function_id = h.function_id ; -
|
|
|
|
Goto Forum:
Current Time: Sat May 18 09:48:30 CDT 2024
|