Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 10 Feb 2006 @ 14:37:12 GMT


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


Subj:   Join Index with UNION stmt..
 
From:   Chakinala, Raju

Can we create join index on multiple table with UNION stmt ?

One of my reports is accessing big tables (one of table has 1.5 B records) with UNION stmt, but performance is very poor. I would like to create join index on these table by using UNION stmt to increase the performance, is it possible to create join index (?) or give me some ideas to improve the performance of query. And also query is not using any aggregate function. ( I think join index mostly useful for aggregate functions ..)

Sample query is

     Select a.col1,a.col2 ... , b.col1,b.col2 ..
     >From table_A a, table_B  b
     Where a.col1=b.col1 ...
     UNION
     Select c.col1,c.col2....d.col1,d.col2 ..
     >From table_C c, table_D d
     Where c.col1=d.col2 ..
     UNION
     Select e.col1,e.col2...,f.col1,f.col2...
     >From table_E e, table_F f
     Where e.col1 = f.col1

Thanks



     
  <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