Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: speed up query HELP!
Please post the explain plan, the tkprof results, what version of Oracle,
what OS, and have you analyzed the tables. Also contents of init.ora would
help.
Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "Bill Thomason" <billthomason_at_charter.net> wrote in message news:v3ifm87tcohod9_at_corp.supernews.com...Received on Thu Jan 30 2003 - 09:42:18 CST
> Hi All,
> I have a query that has a need for speed. can anyone help?
> here you go
>
> SELECT /*+ first_rows */ a.as_of_date,
> to_char(avg(a.yield_to_worst_pct),999999.999),
> to_char(AVG(FLOOR(((a.yield_to_worst_date -
> SYSDATE)/365.25)*.5)*2),999.999),
> to_char(avg(a.option_adj_spread_pct),9999.999) ,
> to_char(avg(a.option_adj_yield_pct),9999.999),
> to_char(avg(duration_to_worst_value), 9999.999),
> to_char(avg(option_adj_duration_value), 9999.999)
> FROM comp_rating_history c, analytics_nov_02 a, security s
> WHERE a.as_of_date= (select max(as_of_date) from analytics_nov_02)
> AND c.security_code = a.security_code
> AND c.as_of_date = a.as_of_date
> AND c.comp_rating_id between 6 and 8
> AND s.security_code = c.security_code
> GROUP BY a.as_of_date;
>
> Thanks,
>
> Bill
>
>