Subject | Query Slow - Help |
---|---|
Author | sivram_mail |
Post date | 2003-06-08T10:23:39Z |
Hello,
This is my query.
select
a.cust_id,
b.lbl,
c.lbl,
a.cust_nam
from
cust_v a,
source_v b,
ctyp_v c
where
a.source_id=b.source_id and
a.ctyp_id=c.ctyp_id and
upper(a.source_id)='SAB'
order by a.cust_nam
This query takes 2 minutes 50 second to fetch 27019
records.CUST_V,SOURCE_V and CTYP are views.i have the index for
cust_id in the CUST Table, source_id in SOURCE table and ctyp_ix in
CTYP Table.Foreign key is not defined and there is no index for
source_id and ctyp_id in CUST table.
how to improve the performance of this query???
Should i create the index for source_id and ctyp_id in CUST table.Is
it must?
Regards,
Sivaraman
This is my query.
select
a.cust_id,
b.lbl,
c.lbl,
a.cust_nam
from
cust_v a,
source_v b,
ctyp_v c
where
a.source_id=b.source_id and
a.ctyp_id=c.ctyp_id and
upper(a.source_id)='SAB'
order by a.cust_nam
This query takes 2 minutes 50 second to fetch 27019
records.CUST_V,SOURCE_V and CTYP are views.i have the index for
cust_id in the CUST Table, source_id in SOURCE table and ctyp_ix in
CTYP Table.Foreign key is not defined and there is no index for
source_id and ctyp_id in CUST table.
how to improve the performance of this query???
Should i create the index for source_id and ctyp_id in CUST table.Is
it must?
Regards,
Sivaraman