Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 04 Jun 2011 @ 18:13:21 GMT


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


Subj:   Re: Product Join: Duplicating large table
 
From:   DWellman

Hi,

As well as the 'missing statistics' answer given previously, there is also 'stale statistics' to consider - although this should be less of a problem on TD 12+.

When you're referring to a "table being duplicated" (or "re-distributed" for that matter), remember that it is only qualifying rows that get duplicated/redistributed. Qualifying rows are those rows that meet any selection criteria in a WHERE / ON clause. So, even if the explain plan says that it is duplicatiing 'tableX' which is the large table in the query this may not be a bad plan.

Check how many rows are estimated to be in the resulting spool file. If a table has X million rows on it, but only 1000 rows qualify and other table has 500000 rows in it, then building a spool from 1000 rows is probably the better plan. But these 1000 rows come from 'the big table'.


Hope that is useful.


Cheers,

Dave

Ward Analytics Ltd - Information in motion (www.ward-analytics.com)



     
  <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