Issue with using single table JI
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Issue with using single table JI Expand / Collapse
Author
Message
Posted 9/17/2009 5:44:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/24/2009 5:42:27 AM
Posts: 2, Visits: 7
Hi,

I have encoutered a weird problem when using single table Join Index. Basically when I want to join to a table (based on which has built a single table JI) twice in a single query, Teradata only use the JI once and redistribute the base table for the second join.

Here is the sample of my query:

table A
( Col_X,
Col_Y,
Col_Z
) primary index (Col_X);

table B
( id,
name
) primary index (id);

Join Index B_JDX
( name,
id
) primary index (name);

select
Col_X,
b1.id as Col_Y_id,
b2.id as Col_Z_id
from
A
join B b1 on A.Col_Y = b1.name
join B b2 on A.Col_Z = b2.name
;


The reasonable Explain that I expect to get is that it should always redistribute the table A to join with the B_JDX. However it chose to use B_JDX once and use B for the other. Could anyone please help shed some light on any possible reason for that?

Thanks!



Post #16860
Posted 9/20/2009 9:05:54 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 11/5/2009 4:40:02 PM
Posts: 717, Visits: 466
Hi Richard,
AFAIK this is a known limitation of JIs, the optimizer is using them only once within a query.

Dieter
Post #16887
Posted 9/20/2009 11:28:49 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/24/2009 5:42:27 AM
Posts: 2, Visits: 7
Thanks for sharing your insights, Dieter!

Is there any reference or material for the reason of that limitation? Or is there any work around it in TD13?

Thanks,
Richard
Post #16890
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 2:49pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.125. 7 queries. Compression Disabled.