473,473 Members | 1,491 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SQL explain plan

JAW
This plan seems like it should perform well. Does anyone see anything.
SQL Statement Text:

DECLARE MTR - RDG - EST - CSR CURSOR

FOR

SELECT A.KY_MTR_BILL_GRP , A.KY_MRDG_ASGNMT , A.KY_MRDG_SEQ_ACTL ,

A.CD_MPT_TYPE , A.KY_PREM_NO , A.KY_MRDG_SEQ_NO , A.KY_BA ,

A.DT_MTR_GRP_EFF , A.DT_NXT_SCH_RDG , A.CD_SIC , A.FL_AC ,
A.KY_SPT ,
A.KY_MPT_NO , A.KY_RDG , A.CD_MPT_STAT , A.QY_MTR_MULT ,
A.CD_MTR_MFGR ,
A.KY_MTR_NO , A.QY_NO_OF_DIAL , A.CD_TAR_SCH , A.CD_TAR_TYPE ,

A.QY_CONS_UNIT , A.CD_STAT

FROM MRDG_STAT A , BILL_ACCT B , OFFICE C , CO_RULE D

WHERE A.KY_BA = B.KY_BA

AND B.CD_OFFICE = C.CD_OFFICE

AND C.CD_CO = D.CD_CO

AND D.KY_RULE_NO = :CU05TB08.KY-RULE-NO

AND

(

(

A.KY_MTR_BILL_GRP = :MISC-APPL-VARIABLES.WS-KY-BILL-GRP-3

AND D.QY_RULE_DATA = 3

)

OR

(

A.KY_MTR_BILL_GRP = :MISC-APPL-VARIABLES.WS-KY-BILL-GRP-1

AND D.QY_RULE_DATA = 1

)

)

AND A.FL_READ_REC = :CU04TB28.FL-READ-REC

AND A.KY_BA >= :WS-COUNTERS.WS-MRDG-STAT-KY-BA-LOW

AND A.KY_BA <= :WS-COUNTERS.WS-MRDG-STAT-KY-BA-HIGH

ORDER BY A.KY_BA , A.KY_MRDG_SEQ_ACTL , A.CD_MPT_TYPE

Access Path Analysis:

PQbkNo: 0 QblkNo: 1 PlanNo: 1 MxOpSq: 0 TBTyp:
TABLE
Access: IXDATA TSLock: IS Prefet: S QblkTy: SEL TabNo: 2

TBCrtr: CISC50 TBName: BILL_ACCT CorrNm: B

IXCrtr: CISC50 IXName: X01002U1 MCols : 1

PllMod: QUERY CP AcDegr: 0 AcPgrp: 1 SrtnPg:

PQbkNo: 0 QblkNo: 1 PlanNo: 2 MxOpSq: 0 TBTyp:
TABLE
Access: IXDATA TSLock: IS Prefet: QblkTy: SEL TabNo: 3

Method: Nested Loop Join JoinTy: Inner MergJC:

TBCrtr: CISC50 TBName: OFFICE CorrNm: C

IXCrtr: CISC50 IXName: X01148U1 MCols : 1

PllMod: QUERY CP AcDegr: 0 AcPgrp: 1 SrtnPg:

JnDegr: 0 JnPgrp: 1 SrtcPg:

PPA REL. 2.3 --------- Plan Analyzer Enhanced Explain -------------
Page
1 2006/05/08 20:54
PAGE 5
------------------------------------------------------------- USER
ID: OPRJAW0
DATE 05-08-06 SQL Statement Detail Reports
TIME 20:4


PQbkNo: 0 QblkNo: 1 PlanNo: 3 MxOpSq: 0 TBTyp:
TABLE
Access: IXDATA TSLock: IS Prefet: QblkTy: SEL TabNo: 4

Method: Nested Loop Join JoinTy: Inner MergJC:

TBCrtr: CISC50 TBName: CO_RULE CorrNm: D

IXCrtr: CISC50 IXName: X01307U1 MCols : 2

PllMod: QUERY CP AcDegr: 0 AcPgrp: 1 SrtnPg:

JnDegr: 0 JnPgrp: 1 SrtcPg:

PQbkNo: 0 QblkNo: 1 PlanNo: 4 MxOpSq: 0 TBTyp:
TABLE
Access: IXDATA TSLock: IS Prefet: S QblkTy: SEL TabNo: 1

Method: Nested Loop Join JoinTy: Inner MergJC:

TBCrtr: CISC50 TBName: MRDG_STAT CorrNm: A

IXCrtr: CISC50 IXName: X01040U2 MCols : 0

PllMod: QUERY CP AcDegr: 0 AcPgrp: 1 SrtnPg:

JnDegr: 0 JnPgrp: 1 SrtcPg:

PQbkNo: 0 QblkNo: 1 PlanNo: 5 MxOpSq: 0 TBTyp:

Method: Result Table Sorted

Sorts Composite Unique: N Join : N Ordrby: Y Grpby: N

SQL Dependency Analysis:

Tablespace Database L Buffpool Pgsze PS/SS
NTbl
Table/Alias/View/Synm Creator Encoding

Index (# Cols) Type Creator U Buffpool Pgsze

----------------------- -------- -------- - ---------- ----- -----
-----
S01G040 Segment DCIS02C1 A BP2 4 64 1

MRDG_STAT Table CISC50 EBCDIC

X01040D1 Type-2 CISC50 D BP3 4096

1

X01040U1 C Type-2 CISC50 U BP3 4096

(UNIQUE,CLUSTERI 4

X01040U2 C Type-2 CISC50 U BP3 4096

(UNIQUE) 6

S01G148 Segment DCIS02C1 A BP2 4 4 1

OFFICE Table CISC50 EBCDIC

X01148U1 C Type-2 CISC50 U BP3 4096

(UNIQUE,CLUSTERI 1

S01G307 Segment DCIS02C1 A BP2 4 4 1

CO_RULE Table CISC50 EBCDIC

X01307U1 Type-2 CISC50 U BP3 4096

(UNIQUE,CLUSTERI 4

S01P002 Parttn DCIS02C1 A BP2 4 4 1

BILL_ACCT Table CISC50 EBCDIC

X01002D2 Type-2 CISC50 D BP3 4096

4

X01002D3 Type-2 CISC50 D BP3 4096

1

1 2006/05/08 20:54
PAGE 6
------------------------------------------------------------- USER
ID: OPRJAW0
X01002D4 Type-2 CISC50 D BP3 4096

1

X01002U1 C Type-2 CISC50 U BP2 4096

(UNIQUE,CLUSTERI 1

X01002U2 C Type-2 CISC50 U BP3 4096

PPA REL. 2.3 --------- Plan Analyzer Enhanced Explain -------------
Page
DATE 05-08-06 SQL Statement Detail Reports
TIME 20:4
(UNIQUE) 2

X01002U3 Type-2 CISC50 U BP3 4096

(UNIQUE) 5

X01002U5 C Type-2 CISC50 U BP3 4096

(UNIQUE) 2

SQL Predicate Analysis:


Filter
Predicate Index
Sarge Factor
-------------------------------------------------------- -----
----- -------
STATEMENT #001

---> A . KY_BA = B . KY_BA YES YES
0.00001
---> B . CD_OFFICE = C . CD_OFFICE YES YES
0.01724
---> C . CD_CO = D . CD_CO YES YES
0.50000
---> D . KY_RULE_NO = :CU05TB08.KY-RULE-NO YES YES
0.40000
---> A . KY_MTR_BILL_GRP = YES YES
0.16666
:MISC-APPL-VARIABLES.WS-KY-BILL-GRP-3

---> D . QY_RULE_DATA = 3 YES YES
0.40000
---> A . KY_MTR_BILL_GRP = YES YES
0.16666
:MISC-APPL-VARIABLES.WS-KY-BILL-GRP-1

---> D . QY_RULE_DATA = 1 YES YES
0.40000
---> A . FL_READ_REC = :CU04TB28.FL-READ-REC YES YES
0.40000
---> A . KY_BA >= :WS-COUNTERS.WS-MRDG-STAT-KY-BA-LOW YES YES
0.33333
---> A . KY_BA <= :WS-COUNTERS.WS-MRDG-STAT-KY-BA-HIGH YES YES
0.33333


PPA REL. 2.3 --------- Plan Analyzer Enhanced Explain -------------
Page 1
DATE 05-08-06 Performance Report
TIME 20:4
Performance data not Available.

Performance Group id 0

1 2006/05/08 20:54
PAGE 7
------------------------------------------------------------- USER
ID: OPRJAW0
Statement id 0

PPA REL. 2.3 --------- Plan Analyzer Enhanced Explain -------------
Page 1
DATE 05-08-06 SQL Statement Detail Reports
TIME 20:4
Source DB2 SSID: DB2D Date/time: 05-08-06,
13:16:09:7
Collection: CISC5 DB2 SSID : DB2D

Package : CUBES001 SQL Code : +0

Stmt : 5,865 (5) Message :

Version :

Hint Used : N/A

May 9 '06 #1
0 1891

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Greg Stark | last post by:
This query is odd, it seems to be taking over a second according to my log_duration logs and according to psql's \timing numbers. However explain analyze says it's running in about a third of a...
14
by: Ina Schmitz | last post by:
Hello all, I don't succeed in displaying the explain plan. I use IBM DB2 Universal Database 8.2. I tried to do the example given in the online help for "Visual Explain". The tables...
5
by: Jon Lapham | last post by:
I have been using the EXPLAIN ANALYZE command to debug some performance bottlenecks in my database. In doing so, I have found an oddity (to me anyway). The "19ms" total runtime reported below...
4
by: marklawford | last post by:
Not having earned my DBA badge from the scouts just yet I'm a little lost with an error I'm getting. We've just upgraded our development database from 7.2 to 8.2 as the first step in upgrading...
0
by: jfnorris | last post by:
I'm having some difficulty with Visual Explain. When I explain reletively simple sql, VE will generate an access plan. If I try to explain sql with several joins both outer and inner, or anthing more...
5
by: kabotnet | last post by:
Hi, I'm new in db2, I'm trying to execute EXPLAIN command on some queries but i have error like: And message similar to: Token EXPLAIN is not valid, valid tokens ( END GET SET CALL DROP FREE...
7
by: skaushik | last post by:
Hi all, I was working on a SQL query where a history table is joined with a small table to get some information. There is an index on the history table column but the explain plan tells that there...
3
by: raviva | last post by:
Hi, I want the explain plan. But when I clicked on the explain plan it says ORA-02404: specified plan table not found. I investigated on net and some books. I was asked to load the utlxplan.sql. I...
0
by: db2admin | last post by:
hello, I have compressed table 442992 rows and when i run explain plan on this table for some SQL using this table, i see table scan and cardinality on top of table node as 18458. I am new to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.