Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 Aug 2015 @ 19:05:35 GMT


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


Subj:   Re: NoPI tables as Staging tables
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, August 05, 2015 13:46 -->

Thanks Dave. I believe the point is made.

However, I have another related question and will ask as part of this thread since I do not want to create another new topic.

Question -

I have a table as below :-

     CREATE TABLE t1
     (col1 INTEGER NOT NULL
     ,start_date DATE NOT NULL
     ,end_date DATE NOT NULL
     );

Users often fire queries which involves a date range based on both start_date and end_date together or either as shown below

Query-1

     select *
       from t1
       where start_date >= '01/01/2015' and end_date < '06/30/2015';

Query-2

     select *
       from t1
       where start_date >= '01/01/2015';

Will it be wise to create a NUSI on start_date and end_date to elevate query performance? Please indicate if 2 separate single column NUSI is preferred or 1 composite NUSI comprising both start_date & end_date is advisable. Also is using a Range based PPI useful in this instance?


Thanks



     
  <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