Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 21 Feb 2007 @ 18:29:08 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Avoid the Product Join
From:   Castelli Emanuel Alejandro

Hi all....

I need your help to try to avoid a Product Join in this query:

     sum (case when b.range = 1 then 1 else 0 end),
     sum (case when b.range = 2 then 1 else 0 end),
     sum (case when b.range = 3 then 1 else 0 end)
     table_a as a,
     table_b as b
     a.duration between b.min_duration and b.max_duration;

The tables:

     table_a (duration is not part of the index)
     table_b (primary index: range, min_duration, max_duration)

Any ideas?


Castelli, Emanuel Alejandro
Desarrollo DataWarehouse - IBM Argentina

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