473,382 Members | 1,225 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,382 software developers and data experts.

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...
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

Aug 10 '06 #1
0 1040

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

Similar topics

1
by: Steve | last post by:
I have a SQL query I'm invoking via VB6 & ADO 2.8, that requires three "Left Outer Joins" in order to return every transaction for a specific set of criteria. Using three "Left Outer Joins"...
7
by: Steve | last post by:
I have a SQL query I'm invoking via VB6 & ADO 2.8, that requires three "Left Outer Joins" in order to return every transaction for a specific set of criteria. Using three "Left Outer Joins"...
3
by: Ian Boyd | last post by:
i know nothing about DB2, but i'm sure this must be possible. i'm trying to get a client to create a view (which it turns out is called a "Logical" in DB2). The query needs a LEFT OUTER JOIN, but...
5
by: Dev | last post by:
Hello all, I need to do a left out join where a.field1 ilike %b.field2% But I can not figure out the exact syntax to using the ilike in the join? ----------
2
by: tricard | last post by:
Good day all, I have a large outer joined query that I want to have some criteria. The select query is gathering all part numbers from tblPartNumbers, left joining to tblPartNumberVendor (since...
1
by: Eitan M | last post by:
Hello, I want to do select like this : select t1.col_2 from table_1 t1, table_2 t2 where t1.col_1 = t2.col_1 (+) The above is correct syntax for Oracle. What is the correct syntax for...
3
by: nico3334 | last post by:
I currently have a query that Joins 2 Tables (Table1 and Table2) using LEFT OUTER JOIN. Here is an example of that query: SELECT a.supply, a.state, b.cost FROM Table1 a LEFT...
1
by: nico3334 | last post by:
I have a query that currently pulls data from a main table and a second table using LEFT OUTER JOIN. I know how to do make another LEFT OUTER JOIN with the main table, but I want to add another LEFT...
9
by: shapper | last post by:
Hello, I am used to SQL but I am starting to use LINQ. How can I create Left, Right and Inner joins in LINQ? How to distinguish the different joins? Here is a great SQL example:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.