Subject | Re: [ib-support] Query Slow - Help |
---|---|
Author | Arno Brinkman |
Post date | 2003-06-08T13:23:05Z |
Hi,
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> This is my query.Show the PLAN that is returned with this 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,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Nederlandse firebird nieuwsgroep :
news://80.126.130.81