Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 14 Jan 2003 @ 22:20:05 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Strange Product Join?
 
From:   John Grace

Harold,

I am guessing here, the explain explicitly states the join condition of ("Store_Key = Daily_Item_Sales.Store_Key").

How many rows are in Daily_Item_Sales? I am going to guess around 360M.

You query contains no filter or constraint. I would expect that you would get all rows in Daily_Item_Sales tables (360M?).

The product join is referring to the many-to-one join required from Daily_Item_Sales to store.

As for Jose's suggestion. If store remains un-constrained, I don't think an index will help. Daily_Item_Sales is being scanned. "3) We do an all-AMPs JOIN step from Spool 2 (Last Use) by way of an all-rows scan"

A scan is required, because you are retrieving ALL the rows.

I you filter the stores table and follow Jose's suggestion I think you will achieve better results.

BTW what is the primary index on the Daily_Item_Sales?

John Grace
Geppetto's Workshop



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023