Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 05 Jan 2006 @ 18:22:10 GMT


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


Subj:   Re: Different Explain plan for different users - SAME SQL
 
From:   Fachtna O Donovan

Hi Al,

I notice that you don't mention stats anywhere in your scenario. If there are no stats on a table Teradata will perform random amp sampling and you may get lucky and get a decent access path otherwise you may get unlucky and get a completely different access path.

If there are stale stats on the table, for example if the demographics of the table has changed by more than 10% Teradata may chose a bad access path because of these old stats. The worst case scenario would be if you collected stats on a table when it was empty and then inserted say 1 Billion rows into the table. Teradata would rightly think that the table was empty a really really bad access path for this query.

You should be collecting stats on every field that you are joining on, the index's and every field if the table is tiny.


Hope this helps,

Fachtna O'Donovan
Software Developer
AIB Bank



     
  <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: 23 Jun 2019