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
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 ; -
Re: optimizing query - taking way too long to run [message #64887 is a reply to message #64851] Thu, 26 February 2004 03:18 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Hi,

No, but if you provide an explain plan, execution statistics, and schema info (indexes, table structures, etc), we might be able to help.

Best regards.

Frank
Previous Topic: buffer cache hit ratio reduces to -3
Next Topic: automate spurge.sql job
Goto Forum:
  


Current Time: Fri Mar 29 05:29:19 CDT 2024