Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 10th, 2006, 07:25 PM
ibadba@hotmail.com
Guest
 
Posts: n/a
Default Collocation of Left Outer Joins

Hello all, today I think I'm stupid, can anyone confirm??

I have a query on multinode DB2 ( v8.2 Aix ), as follows:

select a.col1,b.col1,c.col1
from
table1 a
left outer join
table2 b
on
a.partkey=b.partkey
left outer join
table3 c
on
b.partkey=c.partkey

Only if I explicitly add "and a.partkey=c.partkey" to the last join can
I guarantee collocation ( but this is a generated query ).

Explain plan follows - in this instance it does a DTQ which is ok, when
I do the real , more complex query, the Optimizer decides to BTQ one
side ( which ends up causing lots of problems ) . I don't understand
why the DTQ in 4) is necessary, all tables are partitioned by the same
not nullable col. with same datatype and nodegroup.

thanks for any enlightenment...
Quote:
Query Degree: 1
>
Rows
RETURN
( 1)
Cost
I/O
|
84
DTQ
( 2)
150.376
3.00515
|
1
NLJOIN
( 3)
119.439
3.00515
/-------------+-------------\
1 3.55306e-18
DTQ FETCH
( 4) ( 9)
91.9691 27.4678
2 1.00515
| /----+---\
1 0.00514551 10142
NLJOIN IXSCAN TABLE: MYSCHEMA
( 5) ( 10) C
54.9138 27.3002
2 1
/-------+-------\ |
1 6.35342e-05 10142
IXSCAN FETCH INDEX: MYSCHEMA
( 6) ( 7) C_INDEX
27.3049 55.2222
1 2.09861
| /----+---\
1512 0.0986051 206175
INDEX: MYSCHEMA IXSCAN TABLE: MYSCHEMA
A_INDEX ( 8) B
52.6759
2
|
206175
INDEX: MYSCHEMA
B_INDEX

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles