Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 02 Oct 2008 @ 08:14:58 GMT


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


Subj:   Secondeary index not used
 
From:   Konieczka, Wojciech

Hello All,

Do you you know why teradata doesn't use an index in first example, but use not in next one?

I work on a table which has period_date column which has secondary index on it.

1. query example: (when TD doesn't use index)

     select
     bla,
     from my_table
     where period_dte = (select max(load_dte) from another_table) [this
     subquery always returns one row]

2.

     select
     bla,
     from my_table
     where period_dte = '2008-10-30'

is there any way to change 1st query and make secondary index useful?


Regards

Wojtek



     
  <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