469,138 Members | 1,295 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,138 developers. It's quick & easy.

Help in Query

Hi,

I have the following query.

select distinct a.*,b.launch_dt
from
(
select
list_id,
run_seq,
resp_dt,
sum(udl_count),
sum(ecu_count),
sum(clk_count),
sum(coa_count),
grp_cd,
sum(taf_count),
sum(opn_count),
sum(usb_count),
site_cd

from
(SELECT
list_id,
run_seq,
resp_cd,
to_char(resp_dt,'dd-mon-yy') resp_dt,
decode(resp_cd,'UDL',count(resp_cd),0) udl_count,
decode(resp_cd,'ECU',count(resp_cd),0) ecu_count,
decode(resp_cd,'CLK',count(resp_cd),0) clk_count,
decode(resp_cd,'COA',count(resp_cd),0) coa_count,
grp_cd,
decode(resp_cd,'TAF',count(resp_cd),0) taf_count,
decode(resp_cd,'OPN',count(resp_cd),0) opn_count,
decode(resp_cd,'USB',count(resp_cd),0) usb_count,
site_cd
FROM GCA_CBX_RESP_DAILY_AGGR
GROUP BY
resp_cd,
list_id,
run_seq,
to_char(resp_dt,'dd-mon-yy'),
site_cd,
grp_cd
order by resp_dt desc
)
group by
list_id,
run_seq,
resp_dt,
site_cd,
grp_cd) a,gca_program_run_hist b
where a.list_id=b.list_id and a.run_seq=b.campaign_run_seq;

In the above query i have used some in line views which will decrease the query performance.

Please give me some idea to increase the performance of the query.

Thanks,
Dilip
Jul 11 '07 #1
0 876

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by James | last post: by
9 posts views Thread by netpurpose | last post: by
9 posts views Thread by Dom Boyce | last post: by
5 posts views Thread by Steve Patrick | last post: by
6 posts views Thread by Takeadoe | last post: by
47 posts views Thread by Jo | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.