Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 26 Sep 2014 @ 20:09:31 GMT


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


Subj:   Re: Same query - Different Explains
 
From:   Bakthavachalam, Roopalini

I am running the query in the same appliance/server. Just the databases are different (like PRD and TST). Here is the difference in count. Is this difference significant enough for the EXPLAINS to be different? Actually the query is running under 5 sec in PRD and taking for ever to run in TST database (with smaller row count).

     TABLE                        PRD        TST
     L_F_CUBE_ROW_WRKNG       557,888    285,393
     TR_PRPTY_TRGR             56,173      4,271
     D_ETL_KPIS                    72         72
     D_ACCT_DMNSN                 825      1,825
     F_PRPTY_ACCT           1,196,901    184,306

In the PRD DB, the optimizer is using a different order to join TR_PRPTY_TRGR -> L_F_CUBE_ROW_WRKNG -> D_ETL_KPIS-> D_ACCT_DMNSN -> F_PRPTY_ACCT In the TST DB, the optimizer is using a different order to join TR_PRPTY_TRGR-> D_ETL_KPIS-> D_ACCT_DMNSN-> F_PRPTY_ACCT-> L_F_CUBE_ROW_WRKNG

Note : F_PRPTY_ACCT has a temporal primary key constraint and has a system defined join index.


Thanks

Roopalini



     
  <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