Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 18 Aug 2004 @ 18:23:01 GMT


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


Subj:   Re: Different plans for the same SQL request
 
From:   Fred Pluebell

Possibilities for real differences in query plans (not just formatting) between EXPLAIN and what is already executing:

1) Something changed between the time the executing query was optimized and the time of the EXPLAIN, e.g. index built, updated stats collected.

2) The SQL isn't really the same; for example, EXPLAIN supplies literal values in the WHERE clause but the real query has parameter markers or host variables. (If the actual values are known at optimization time, the optimizer can generate an "aggressive" query plan; otherwise it may focus on minimizing worst case.)



     
  <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