Re: Indexing a view
Date: 19 Aug 2002 08:22:36 -0700
Message-ID: <8b59c056.0208190722.2bef8857_at_posting.google.com>
skriyaz_at_yahoo.com (Riyaz) wrote in message news:<8b59c056.0208161030.5506e02f_at_posting.google.com>...
> Hi,
> Is there any way to index a VIEW.
>
> Thanks,
> Riyaz
Hi Rene,
Thanks for your view.To be very clear this is how my view
goes.
This is how the view looks.
create view view_tab as
It is just a select statment (14 tables) having outer joins to
retrieve all rows.which are linked by the "where criteria".The view is
getting very slow.
I just wanted to make it fast.Is there any other to rewrite this.
select A.GROUP_ID,A.CASE_ID,A.INTTR_EMP_ID,A.RCVD_DT,A.CAU_ATRNY_EMP_ID,A.RGNL_ATRNY_EMP_ID,A.XPDT_FL,A.RSPND_BY_DT,A.ACTN_CD,A.DCSN_CD,A.DCSN_DT,A.CMPLN_FILED_DT,A.FRML_ACTN_CASE_ID,
B.INTTG_DEPT_CD,B.EXAM_ID,B.CASE_DESC_TX,
C.TYPE_CD AS ALGTN_CODE,
D.DESC_TX AS ALGTN_DESC,
E.DESC_TX AS ACTN_DESC,
F.LAST_NM AS EMPLOYEE_LAST_NAME,F.LOC_ID AS EMP_LOC_ID,
G.BLOCK_NT,
H.OFFR_CASE_ID,H.RCVD_DT AS OFFER_RCVD_DT,H.CAU_DCSN_CD,
H.CAU_DCSN_DT,H.DCMTN_RCVD_DT,
I.CRD_ID,I.RSPDT_NM,
J.ST_CD,
K.DESC_TX AS STATUS_DESCRIPTION,
L.DESC_TX AS DEPT_DESC,
M.PRNT_EXAM_ID,M.CHILD_EXAM_ID
from
TABLE A,
TABLE B,
TABLE C,
TABLE D,
TABLE E,
TABLE F,
TABLE G,
TABLE H,
TABLE I,
TABLE J,
TABLE K,
TABLE L,
TABLE M
where a.group_id =b.group_id(+) and
A.CASE_ID =C.CASE_ID (+) and
C.TYPE_CD =D.TYPE_CD (+) and
A.ACTN_CD =E.ACTN_CD (+) and
A.INTTR_EMP_ID=F.EMP_ID (+) and
A.CASE_ID =G.CASE_ID (+) and
A.CASE_ID =H.CASE_ID (+) and
A.CASE_ID =I.CASE_ID (+) and
A.CASE_ID =J.CASE_ID (+) and
J.ST_CD =K.ST_CD (+) and
B.INTTG_DEPT_CD=L.DEPT_CD (+) and
B.EXAM_ID= M.PRNT_EXAM_ID (+)
Received on Mon Aug 19 2002 - 17:22:36 CEST