473,386 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Federated Join EE to EEE


I am attempting to join two tables together on two different unix
servers. Here is some relevant info about the tables.

TABLE 1 Setup

-----------------------

DB2 UDB 7.2 EE

AIX

CBS_STG.S_BAT_IN

Number of Rows About 200,000

No Indexes

CREATE TABLE CBS_STG.S_BAT_IN(

NUMBER_1_3 SMALLINT NOT NULL,

NUMBER_4_6 SMALLINT NOT NULL,

NUMBER_7_9 SMALLINT NOT NULL,

);

TABLE 2 Setup

------------------------

DB2 UDB 7.2 EEE

AIX

8 Nodes

BILL_DW.BILL_ACCT

Number of Rows about 15,000,000

Partitioning Key On BILL_ACCT_KEY

Index on BILL_ACCT_NUM

CREATE TABLE BILL_DW.BILL_ACCT(

BILL_ACCT_KEY INTeger NOT NULL,

BILL_ACCT_NUM CHARacter(9) NOT NULL

);

CREATE INDEX BILL_ACCT_X1 ON BILL_DW.BILL_ACCT(BILL_ACCT_NUM);

Utilizing federation I am now attempting to join the following tables
together utilizing the following SQL Statement.

SELECT BILL_ACCT.BILL_ACCT_KEY, BILL_ACCT.BILL_ACCT_NUM

FROM CBS_STG.S_BAT_IN S_BAT_IN,

BILL_DW.BILL_ACCT BILL_ACCT

WHERE BILL_ACCT.BILL_ACCT_NUM = CAST(RIGHT(
DIGITS(S_BAT_IN.NUMBER_1_3),3) ||

RIGHT( DIGITS(S_BAT_IN.NUMBER_4_6),3) || RIGHT(

DIGITS(S_BAT_IN.NUMBER_7_9),3) as CHAR(9));

Running this through explain plan yields the following "Optimized
Statement".

SELECT Q2.$C0 AS "BILL_ACCT_KEY", Q2.$C1 AS "BILL_ACCT_NUM"

FROM

(SELECT Q1.BILL_ACCT_KEY, Q1.BILL_ACCT_NUM

FROM BILL_DW.BILL_ACCT AS Q1) AS Q2, CBS_STG.S_BAT_IN AS Q3

WHERE (Q2.$C1 = CHAR(("SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_1_3 ),

4000), 3) || "SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_4_6 ),

4000), 3) || "SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_7_9 ),

4000), 3)), 9))

Notice in the optimized query the following statement (SELECT
Q1.BILL_ACCT_KEY, Q1.BILL_ACCT_NUM FROM BILL_DW.BILL_ACCT AS Q1) AS Q2
Why is it doing this? This will produce an inline view with no
indexes which means I am then joining a 200,000 row table to a
15,000,000 table together through table scan. Why can it not
effectively push down the CBS_STG.S_BAT_IN table to create a temp table
and then join to the BILL_DW.BILL_ACCT table utilizing an index. The
query is being run from the system that contains BILL_DW.BILL_ACCT and
the reason being is we though it would only have to push down the
smallest tables contents. The cost on the query is 3.23844e+10 and as
you can guess doesn't ever finish executing. How can I better optimize
this join through federation?

Spencer
--
Posted via http://dbforums.com
Nov 12 '05 #1
7 2890
Hi Spencer, Can you post the optimizer plan too? What SQL is in the RQUERY
or SHIP operator? Do you see any ISCAN on the local
table?(BILL_DW.BILL_ACCT)
The optimized statement that you posted is not actually the remote stmt that
we are generating. Its an intermediate form though.
Thanks
Aakash
"stabbert" <me*********@dbforums.com> wrote in message
news:35****************@dbforums.com...

I am attempting to join two tables together on two different unix
servers. Here is some relevant info about the tables.

TABLE 1 Setup

-----------------------

DB2 UDB 7.2 EE

AIX

CBS_STG.S_BAT_IN

Number of Rows About 200,000

No Indexes

CREATE TABLE CBS_STG.S_BAT_IN(

NUMBER_1_3 SMALLINT NOT NULL,

NUMBER_4_6 SMALLINT NOT NULL,

NUMBER_7_9 SMALLINT NOT NULL,

);

TABLE 2 Setup

------------------------

DB2 UDB 7.2 EEE

AIX

8 Nodes

BILL_DW.BILL_ACCT

Number of Rows about 15,000,000

Partitioning Key On BILL_ACCT_KEY

Index on BILL_ACCT_NUM

CREATE TABLE BILL_DW.BILL_ACCT(

BILL_ACCT_KEY INTeger NOT NULL,

BILL_ACCT_NUM CHARacter(9) NOT NULL

);

CREATE INDEX BILL_ACCT_X1 ON BILL_DW.BILL_ACCT(BILL_ACCT_NUM);

Utilizing federation I am now attempting to join the following tables
together utilizing the following SQL Statement.

SELECT BILL_ACCT.BILL_ACCT_KEY, BILL_ACCT.BILL_ACCT_NUM

FROM CBS_STG.S_BAT_IN S_BAT_IN,

BILL_DW.BILL_ACCT BILL_ACCT

WHERE BILL_ACCT.BILL_ACCT_NUM = CAST(RIGHT(
DIGITS(S_BAT_IN.NUMBER_1_3),3) ||

RIGHT( DIGITS(S_BAT_IN.NUMBER_4_6),3) || RIGHT(

DIGITS(S_BAT_IN.NUMBER_7_9),3) as CHAR(9));

Running this through explain plan yields the following "Optimized
Statement".

SELECT Q2.$C0 AS "BILL_ACCT_KEY", Q2.$C1 AS "BILL_ACCT_NUM"

FROM

(SELECT Q1.BILL_ACCT_KEY, Q1.BILL_ACCT_NUM

FROM BILL_DW.BILL_ACCT AS Q1) AS Q2, CBS_STG.S_BAT_IN AS Q3

WHERE (Q2.$C1 = CHAR(("SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_1_3 ),

4000), 3) || "SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_4_6 ),

4000), 3) || "SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_7_9 ),

4000), 3)), 9))

Notice in the optimized query the following statement (SELECT
Q1.BILL_ACCT_KEY, Q1.BILL_ACCT_NUM FROM BILL_DW.BILL_ACCT AS Q1) AS Q2
Why is it doing this? This will produce an inline view with no
indexes which means I am then joining a 200,000 row table to a
15,000,000 table together through table scan. Why can it not
effectively push down the CBS_STG.S_BAT_IN table to create a temp table
and then join to the BILL_DW.BILL_ACCT table utilizing an index. The
query is being run from the system that contains BILL_DW.BILL_ACCT and
the reason being is we though it would only have to push down the
smallest tables contents. The cost on the query is 3.23844e+10 and as
you can guess doesn't ever finish executing. How can I better optimize
this join through federation?

Spencer
--
Posted via http://dbforums.com

Nov 12 '05 #2

I am attaching the entire plan. I am unfamilar on how to capture the
RQUERY and SHIP Operator?

Spencer

DB2 Universal Database Version 7.2, 5622-044 (c) Copyright IBM Corp.
1991, 2001

Licensed Material - Program Property of IBM

IBM DATABASE 2 Explain Table Format Tool



******************** EXPLAIN INSTANCE ********************

DB2_VERSION: 07.02.8

SOURCE_NAME: SQLC2D04

SOURCE_SCHEMA: NULLID

EXPLAIN_TIME: 2003-10-30-10.53.19.562984

EXPLAIN_REQUESTER: DB2UDB

Database Context:

----------------

Parallelism: Intra-Partition & Inter-Partition
Parallelism

CPU Speed: 1.058838e-06

Comm Speed: 100

Buffer Pool size: 250400

Sort Heap size: 7500

Database Heap size: 12000

Lock List size: 1200

Maximum Lock List: 10

Average Applications: 4

Locks Available: 13560

Package Context:

---------------

SQL Type: Dynamic

Optimization Level: 5

Blocking: Block All Cursors

Isolation Level: Cursor Stability



---------------- STATEMENT 1 SECTION 201 ----------------

QUERYNO: 1

QUERYTAG: CLP

Statement Type: Select

Updatable: No

Deletable: No

Query Degree: -1

Original Statement:

------------------

SELECT BILL_ACCT.BILL_ACCT_KEY, BILL_ACCT.BILL_ACCT_NUM

FROM CBS_STG.S_BAT_IN S_BAT_IN, BILL_DW.BILL_ACCT BILL_ACCT

WHERE BILL_ACCT.BILL_ACCT_NUM = CAST(RIGHT(
DIGITS(S_BAT_IN.NUMBER_1_3),3) ||

RIGHT( DIGITS(S_BAT_IN.NUMBER_4_6),3) || RIGHT(

DIGITS(S_BAT_IN.NUMBER_7_9),3) as CHAR(9))

Optimized Statement:

-------------------

SELECT Q2.$C0 AS "BILL_ACCT_KEY", Q2.$C1 AS "BILL_ACCT_NUM"

FROM

(SELECT Q1.BILL_ACCT_KEY, Q1.BILL_ACCT_NUM

FROM BILL_DW.BILL_ACCT AS Q1) AS Q2, CBS_STG.S_BAT_IN AS Q3

WHERE (Q2.$C1 = CHAR(("SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_1_3 ),

4000), 3) || "SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_4_6 ),

4000), 3) || "SYSFUN
"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_7_9 ),

4000), 3)), 9))

Access Plan:

-----------

Total Cost: 3.23844e+10

Query Degree: 0

Rows

RETURN

( 1)

Cost

I/O

|

2.21859e+06

NLJOIN

( 2)

3.23844e+10

20372

/---+---\

1.43694e+07 0.154397

DTQ TBSCAN

( 3) ( 5)

83601.9 11966.4

18913 354

| |

1.79617e+06 277324

TBSCAN TEMP

( 4) ( 6)

77388.4 9712.65

18913 354

| |

1.79617e+06 277324

TABLE: BILL_DW RQUERY

BILL_ACCT ( 7)

9360.27

354

|

277324

NK: CBS_STG

S_BAT_IN
--
Posted via http://dbforums.com
Nov 12 '05 #3

1) RETURN: (Return Result)

Cumulative Total Cost: 3.23844e+10

Cumulative CPU Cost: 3.05847e+16

Cumulative I/O Cost: 20372

Cumulative Re-Total Cost: 3.23843e+10

Cumulative Re-CPU Cost: 3.05847e+16

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 24334.7

Cumulative Comm Cost: 227622

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 20018

Remote communication cost: 143984

Arguments:

---------

BLDLEVEL: (Build level)

DB2 v7.1.0.82 : s030617

ENVVAR : (Environment Variable)

DB2_HASH_JOIN = ON

Input Streams:

-------------

8) From Operator #2

Estimated number of rows:
2.21859e+06

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 2

Subquery predicate ID: Not
Applicable

Column Names:

------------

+BILL_ACCT_NUM+BILL_ACCT_KEY

Partition Column Names:

----------------------

+NONE

2) NLJOIN: (Nested Loop Join)

Cumulative Total Cost: 3.23844e+10

Cumulative CPU Cost: 3.05847e+16

Cumulative I/O Cost: 20372

Cumulative Re-Total Cost: 3.23843e+10

Cumulative Re-CPU Cost: 3.05847e+16

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 24334.7

Cumulative Comm Cost: 227622

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 20018

Remote communication cost: 143984

Arguments:

---------

EARLYOUT: (Early Out flag)

FALSE

FETCHMAX: (Override for FETCH MAXPAGES)

IGNORE

ISCANMAX: (Override for ISCAN MAXPAGES)

IGNORE

Predicates:

----------

2) Predicate used in Join

Relational Operator: Equal (=)

Subquery Input Required: No

Filter Factor: 5.5674e-07

Predicate Text:

--------------

(Q2.$C1 = CHAR(("SYSFUN

"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_1_3 ), 4000),

"." 3) || "SYSFUN

"."

"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_4_6 ), 4000),

"." 3) || "SYSFUN

"."

"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_7_9 ), 4000),

"." 3)), 9))

Input Streams:

-------------

3) From Operator #3

Estimated number of rows:
1.43694e+07

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 2

Subquery predicate ID: Not
Applicable

Column Names:

------------

+BILL_ACCT_KEY+BILL_ACCT_NUM

Partition Column Names:

----------------------

+NONE

7) From Operator #5

Estimated number of rows: 0.154397

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE

Output Streams:

--------------

8) To Operator #1

Estimated number of rows:
2.21859e+06

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 2

Subquery predicate ID: Not
Applicable

Column Names:

------------

+BILL_ACCT_NUM+BILL_ACCT_KEY

Partition Column Names:

----------------------

+NONE

3) TQ : (Table Queue)

Cumulative Total Cost: 83601.9

Cumulative CPU Cost: 9.05114e+09

Cumulative I/O Cost: 18913

Cumulative Re-Total Cost: 3275

Cumulative Re-CPU Cost: 3.09301e+09

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 25.1882

Cumulative Comm Cost: 227622

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 18913

Arguments:

---------

JN INPUT: (Join input leg)

OUTER

LISTENER: (Listener Table Queue type)

FALSE

TQMERGE : (Merging Table Queue flag)

FALSE

TQREAD : (Table Queue Read type)

READ AHEAD

TQSEND : (Table Queue Write type)

DIRECTED

UNIQUE : (Uniqueness required flag)

FALSE

Input Streams:

-------------

2) From Operator #4

Estimated number of rows:
1.79617e+06

Partition Map ID: -100

Partitioning: (MULT )

Multiple
Partiti-
ons

Number of columns: 2

Subquery predicate ID: Not
Applicable

Column Names:

------------

+BILL_ACCT_KEY+BILL_ACCT_NUM

Partition Column Names:

----------------------

+1: BILL_ACCT_KEY

Output Streams:

--------------

3) To Operator #2

Estimated number of rows:
1.43694e+07

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 2

Subquery predicate ID: Not
Applicable

Column Names:

------------

+BILL_ACCT_KEY+BILL_ACCT_NUM

Partition Column Names:

----------------------

+NONE

4) TBSCAN: (Table Scan)

Cumulative Total Cost: 77388.4

Cumulative CPU Cost: 3.18289e+09

Cumulative I/O Cost: 18913

Cumulative Re-Total Cost: 3275

Cumulative Re-CPU Cost: 3.09301e+09

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 25.0522

Cumulative Comm Cost: 0

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 18913

Arguments:

---------

MAXPAGES: (Maximum pages for prefetch)

ALL

PREFETCH: (Type of Prefetch)

SEQUENTIAL

ROWLOCK : (Row Lock intent)

NEXT KEY SHARE

SCANDIR : (Scan Direction)

FORWARD

TABLOCK : (Table Lock intent)

INTENT SHARE

Input Streams:

-------------

1) From Object BILL_DW.BILL_ACCT

Estimated number of rows:
1.79617e+06

Partition Map ID: 6

Partitioning: (MULT )

Multiple
Partiti-
ons

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+$RID$+BILL_ACCT_NUM+BILL_ACCT_KEY

Partition Column Names:

----------------------

+1: BILL_ACCT_KEY

Output Streams:

--------------

2) To Operator #3

Estimated number of rows:
1.79617e+06

Partition Map ID: -100

Partitioning: (MULT )

Multiple
Partiti-
ons

Number of columns: 2

Subquery predicate ID: Not
Applicable

Column Names:

------------

+BILL_ACCT_KEY+BILL_ACCT_NUM

Partition Column Names:

----------------------

+1: BILL_ACCT_KEY

5) TBSCAN: (Table Scan)

Cumulative Total Cost: 11966.4

Cumulative CPU Cost: 2.94321e+09

Cumulative I/O Cost: 354

Cumulative Re-Total Cost: 2253.7

Cumulative Re-CPU Cost: 2.12846e+09

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 11966.4

Cumulative Comm Cost: 0

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 1105

Remote communication cost: 143984

Arguments:

---------

JN INPUT: (Join input leg)

INNER

MAXPAGES: (Maximum pages for prefetch)

ALL

PREFETCH: (Type of Prefetch)

NONE

SCANDIR : (Scan Direction)

FORWARD

Predicates:

----------

2) Sargable Predicate

Relational Operator: Equal (=)

Subquery Input Required: No

Filter Factor: 5.5674e-07

Predicate Text:

--------------

(Q2.$C1 = CHAR(("SYSFUN

"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_1_3 ), 4000),

"." 3) || "SYSFUN

"."

"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_4_6 ), 4000),

"." 3) || "SYSFUN

"."

"."RIGHT"($INTERNAL_FUNC$(DIGITS(Q3.NUMBER_7_9 ), 4000),

"." 3)), 9))

Input Streams:

-------------

6) From Operator #6

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE

Output Streams:

--------------

7) To Operator #2

Estimated number of rows: 0.154397

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE

6) TEMP : (Create Temporary Table)

Cumulative Total Cost: 9712.65

Cumulative CPU Cost: 8.14717e+08

Cumulative I/O Cost: 354

Cumulative Re-Total Cost: 0

Cumulative Re-CPU Cost: 0

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 9712.65

Cumulative Comm Cost: 0

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 1105

Remote communication cost: 143984

Arguments:

---------

CSETEMP : (Temp over common sub-expression flag)

FALSE

SLOWMAT : (Slow Materialization flag)

FALSE

TEMPSIZE: (Temporary Table Page Size)

4096

Input Streams:

-------------

5) From Operator #7

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE

Output Streams:

--------------

6) To Operator #5

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE
--
Posted via http://dbforums.com
Nov 12 '05 #4

7) RQUERY: (Remote Query)

Cumulative Total Cost: 9360.27

Cumulative CPU Cost: 4.81917e+08

Cumulative I/O Cost: 354

Cumulative Re-Total Cost: 505.361

Cumulative Re-CPU Cost: 4.77279e+08

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 25.0561

Cumulative Comm Cost: 0

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 355

Remote communication cost: 143984

Arguments:

---------

CSERQY : (Remote common subexpression)

FALSE

RMTQTXT : (Remote statement)

SELECT A0."NUMBER_1_3", A0."NUMBER_4_6",
A0."NUMBER_7_9" FROM "CBS_STG"."S_BAT_IN" A0

RMTSEVER: (Remote server)

STG_P01

STREAM : (Remote stream)

FALSE

Input Streams:

-------------

4) From Object CBS_STG.S_BAT_IN

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 53

Subquery predicate ID: Not
Applicable

Partition Column Names:

----------------------

+NONE

Output Streams:

--------------

5) To Operator #6

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE

Objects Used in Access Plan:

---------------------------

Schema: CBS_STG

Name: S_BAT_IN

Type: Nickname

Time of creation: 2003-10-27-
13.05.47.308142

Last statistics update:

Number of columns: 53

Number of rows: 277324

Width of rows: 18

Number of buffer pool pages: 4334

Distinct row values: No

Tablespace name:

Tablespace overhead: 24.100000

Tablespace transfer rate: 0.900000

Prefetch page count: 32

Container extent page count: 32

Schema: BILL_DW

Name: BILL_ACCT

Type: Table

Time of creation: 2003-06-27-
08.37.51.360009

Last statistics update: 2003-10-27-
12.48.38.364203

Number of columns: 7

Number of rows: 1796172

Width of rows: 25

Number of buffer pool pages: 18913

Distinct row values: No

Tablespace name:
BILL_DW_BILL_ACCT

Tablespace overhead: 24.100000

Tablespace transfer rate: 0.900000

Prefetch page count: 64

Container extent page count: 32

Table overflow record count: 0
--
Posted via http://dbforums.com
Nov 12 '05 #5
I see that a nested loop join is executed. I would make sure to run RUNSTATS
on both tables before rerunning the statement. Try and let mw know.
Mauro.

"stabbert" <me*********@dbforums.com> wrote in message
news:35****************@dbforums.com...

7) RQUERY: (Remote Query)

Cumulative Total Cost: 9360.27

Cumulative CPU Cost: 4.81917e+08

Cumulative I/O Cost: 354

Cumulative Re-Total Cost: 505.361

Cumulative Re-CPU Cost: 4.77279e+08

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 25.0561

Cumulative Comm Cost: 0

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 355

Remote communication cost: 143984

Arguments:

---------

CSERQY : (Remote common subexpression)

FALSE

RMTQTXT : (Remote statement)

SELECT A0."NUMBER_1_3", A0."NUMBER_4_6",
A0."NUMBER_7_9" FROM "CBS_STG"."S_BAT_IN" A0

RMTSEVER: (Remote server)

STG_P01

STREAM : (Remote stream)

FALSE

Input Streams:

-------------

4) From Object CBS_STG.S_BAT_IN

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 53

Subquery predicate ID: Not
Applicable

Partition Column Names:

----------------------

+NONE

Output Streams:

--------------

5) To Operator #6

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE

Objects Used in Access Plan:

---------------------------

Schema: CBS_STG

Name: S_BAT_IN

Type: Nickname

Time of creation: 2003-10-27-
13.05.47.308142

Last statistics update:

Number of columns: 53

Number of rows: 277324

Width of rows: 18

Number of buffer pool pages: 4334

Distinct row values: No

Tablespace name:

Tablespace overhead: 24.100000

Tablespace transfer rate: 0.900000

Prefetch page count: 32

Container extent page count: 32

Schema: BILL_DW

Name: BILL_ACCT

Type: Table

Time of creation: 2003-06-27-
08.37.51.360009

Last statistics update: 2003-10-27-
12.48.38.364203

Number of columns: 7

Number of rows: 1796172

Width of rows: 25

Number of buffer pool pages: 18913

Distinct row values: No

Tablespace name:
BILL_DW_BILL_ACCT

Tablespace overhead: 24.100000

Tablespace transfer rate: 0.900000

Prefetch page count: 64

Container extent page count: 32

Table overflow record count: 0
--
Posted via http://dbforums.com

Nov 12 '05 #6
Hi, From the plan it seems that the smaller table is being entirely
shipped(rquery) to the federated server which is what you desire. Remember
in v72, federated does not exploit local parallelism, so that might be an
issue here.
May be you explore summary table over nickname (not too sure if its
available in v72) or create a local copy of the nickname if space is not an
issue. That is if you want to exploit local parallelism
Thanks
Aakash
"Mauro Cazzari" <ma***********@sas.com> wrote in message
news:bo**********@license1.unx.sas.com...
I see that a nested loop join is executed. I would make sure to run RUNSTATS on both tables before rerunning the statement. Try and let mw know.
Mauro.

"stabbert" <me*********@dbforums.com> wrote in message
news:35****************@dbforums.com...

7) RQUERY: (Remote Query)

Cumulative Total Cost: 9360.27

Cumulative CPU Cost: 4.81917e+08

Cumulative I/O Cost: 354

Cumulative Re-Total Cost: 505.361

Cumulative Re-CPU Cost: 4.77279e+08

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 25.0561

Cumulative Comm Cost: 0

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 355

Remote communication cost: 143984

Arguments:

---------

CSERQY : (Remote common subexpression)

FALSE

RMTQTXT : (Remote statement)

SELECT A0."NUMBER_1_3", A0."NUMBER_4_6",
A0."NUMBER_7_9" FROM "CBS_STG"."S_BAT_IN" A0

RMTSEVER: (Remote server)

STG_P01

STREAM : (Remote stream)

FALSE

Input Streams:

-------------

4) From Object CBS_STG.S_BAT_IN

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 53

Subquery predicate ID: Not
Applicable

Partition Column Names:

----------------------

+NONE

Output Streams:

--------------

5) To Operator #6

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )

Coordin-
ator Pa-
rtition

Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE

Objects Used in Access Plan:

---------------------------

Schema: CBS_STG

Name: S_BAT_IN

Type: Nickname

Time of creation: 2003-10-27-
13.05.47.308142

Last statistics update:

Number of columns: 53

Number of rows: 277324

Width of rows: 18

Number of buffer pool pages: 4334

Distinct row values: No

Tablespace name:

Tablespace overhead: 24.100000

Tablespace transfer rate: 0.900000

Prefetch page count: 32

Container extent page count: 32

Schema: BILL_DW

Name: BILL_ACCT

Type: Table

Time of creation: 2003-06-27-
08.37.51.360009

Last statistics update: 2003-10-27-
12.48.38.364203

Number of columns: 7

Number of rows: 1796172

Width of rows: 25

Number of buffer pool pages: 18913

Distinct row values: No

Tablespace name:
BILL_DW_BILL_ACCT

Tablespace overhead: 24.100000

Tablespace transfer rate: 0.900000

Prefetch page count: 64

Container extent page count: 32

Table overflow record count: 0
--
Posted via http://dbforums.com


Nov 12 '05 #7
Here is some more information:

the big table (CBS) has to be brought to the coordinator to do the join.
This is the best we can do in db2_v72. The table scan on CBS can be turned
into index scan, but dont know how much it will help performance. The index
scan helps if it is on the inner of nljn and it is used to retrieve only
limited number of rows because of index start-stop predicates.

Thanks, Aakash

"Aakash Bordia" <a_******@hotmail.com> wrote in message
news:bo**********@hanover.torolab.ibm.com...
Hi, From the plan it seems that the smaller table is being entirely
shipped(rquery) to the federated server which is what you desire. Remember
in v72, federated does not exploit local parallelism, so that might be an
issue here.
May be you explore summary table over nickname (not too sure if its
available in v72) or create a local copy of the nickname if space is not an issue. That is if you want to exploit local parallelism
Thanks
Aakash
"Mauro Cazzari" <ma***********@sas.com> wrote in message
news:bo**********@license1.unx.sas.com...
I see that a nested loop join is executed. I would make sure to run

RUNSTATS
on both tables before rerunning the statement. Try and let mw know.
Mauro.

"stabbert" <me*********@dbforums.com> wrote in message
news:35****************@dbforums.com...

7) RQUERY: (Remote Query)

Cumulative Total Cost: 9360.27

Cumulative CPU Cost: 4.81917e+08

Cumulative I/O Cost: 354

Cumulative Re-Total Cost: 505.361

Cumulative Re-CPU Cost: 4.77279e+08

Cumulative Re-I/O Cost: 0

Cumulative First Row Cost: 25.0561

Cumulative Comm Cost: 0

Cumulative First Comm Cost: 0

Estimated Bufferpool Buffers: 355

Remote communication cost: 143984

Arguments:

---------

CSERQY : (Remote common subexpression)

FALSE

RMTQTXT : (Remote statement)

SELECT A0."NUMBER_1_3", A0."NUMBER_4_6",
A0."NUMBER_7_9" FROM "CBS_STG"."S_BAT_IN" A0

RMTSEVER: (Remote server)

STG_P01

STREAM : (Remote stream)

FALSE

Input Streams:

-------------

4) From Object CBS_STG.S_BAT_IN

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )
Coordin- ator Pa- rtition
Number of columns: 53

Subquery predicate ID: Not
Applicable

Partition Column Names:

----------------------

+NONE

Output Streams:

--------------

5) To Operator #6

Estimated number of rows: 277324

Partition Map ID: -100

Partitioning: (COOR )
Coordin- ator Pa- rtition
Number of columns: 3

Subquery predicate ID: Not
Applicable

Column Names:

------------

+NUMBER_7_9+NUMBER_4_6+NUMBER_1_3

Partition Column Names:

----------------------

+NONE

Objects Used in Access Plan:

---------------------------

Schema: CBS_STG

Name: S_BAT_IN

Type: Nickname

Time of creation: 2003-10-27-
13.05.47.308142

Last statistics update:

Number of columns: 53

Number of rows: 277324

Width of rows: 18

Number of buffer pool pages: 4334

Distinct row values: No

Tablespace name:

Tablespace overhead: 24.100000

Tablespace transfer rate: 0.900000

Prefetch page count: 32

Container extent page count: 32

Schema: BILL_DW

Name: BILL_ACCT

Type: Table

Time of creation: 2003-06-27-
08.37.51.360009

Last statistics update: 2003-10-27-
12.48.38.364203

Number of columns: 7

Number of rows: 1796172

Width of rows: 25

Number of buffer pool pages: 18913

Distinct row values: No

Tablespace name:
BILL_DW_BILL_ACCT

Tablespace overhead: 24.100000

Tablespace transfer rate: 0.900000

Prefetch page count: 64

Container extent page count: 32

Table overflow record count: 0
--
Posted via http://dbforums.com



Nov 12 '05 #8

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

Similar topics

3
by: Terry | last post by:
Hi All, Im trying to run db2expln over some sql in order to find out why its so slow. I receive the following error message. LINE MESSAGES FOR DYNEXPLN.sqc ------ ...
0
by: Joerg Ammann | last post by:
hi, os: aix 4.3.3 DB2: version 7 FP3 we are using a federated DB setup, datasource and fed-Db are both V7FP3 (in fact they are on the same server) and are having massiv performance problems....
1
by: RdR | last post by:
Hi, I have a table in SQL Server with no keys, I point this as a federated table in DB2 but in DB2 I have defined keys against this federated table in SQL. Where will the key constraints be...
1
by: Terry | last post by:
Problem: ========= Unknown column appearing in federated tables. Description: ============ Local database (L) is an established 'federated' database, extracting values from multiple remote...
4
by: uthuras | last post by:
Greetings all, Is it possible to have federated db feature implemented among DB2 family? I intend to create federated within DB2 databases. I have 2 databases TestA and TestB. I have some base...
5
by: Alias | last post by:
Hi Guys , I am trying to create a federated database link between 2 UDB 8.1 databases running on AIX on the same box but under different instances. When i tried this thru the control centre , I...
5
by: Klemens | last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction Do I have to change some settings to get done or ist this not possible by...
2
by: Tim V. | last post by:
Here's the layout: AIX v5.2, DB2 v8 fp8 running in 64bit I've got a Multi-partitioned db running on lpar4 and I want to connect it to 2 instances running on lpar13. We'll deal with just 1...
4
by: Praveen_db2 | last post by:
Hi All DB2 8.1.3,Windows I have 2 databases in a single instance, say DB_1 and DB_2.I need to query a table from DB_1 in DB_2.I am try to use a nickname for it.But nickname creation is not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.