Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 02 Oct 2002 @ 14:21:06 GMT


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


Subj:   Multiple Views of an Object and the Optimizer
 
From:   Claybourne Barrineau

All,

I have a case where (in order to make my data look like a star schema to the reporting tool) I'd like to make a single physical table (BaseDim) look like mulitple dimension tables via the use of views. Each 'View' of the BaseDim contains a unique subset of columns.

After creating these views, I ran some explains to understand how the optimizer would handle the SQL. As it turns out, each view resulted in the creation of a seperate spool file. I was hoping that the Optimizer would only create a single spool file resulting from a single scan of 'BaseDim.'

Now, in terms of recursive joins, I understand why it is important to treat each view of a table as a seperate spool file when the Optimizer resolves a query; however, in my case, the optimizer should have been smart enough to see that each of my 'views' of BaseDim looked at a unique subset of columns of the same physical table; therefore, it should have performed a single scan of the table and created a single spool file of the results.

Does anybody else agree?


Thanks,

Clay



     
  <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