Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 15 Oct 2013 @ 21:47:21 GMT

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

Subj:   Re: Adding a Name to Primary Index without recreating it
From:   Dieter Noeth

Anomy.Anom wrote:

  Is there a way to simply alter the table and add a name to an index (including Primary Index). I would neither be changing the PI or its data type.  

Adding a name for the PI is easy:

     alter table tab modify primary index pi_name(pi_columns);

But afaik there's no way to name a SI after creation. You might have to recreate them.

  The reason I'm looking out for an easy way out is that in addition to redefining the table, we have to redefine all the stats and we have not maintained the stats definition script. Create table With stats is also ruled out since my purpose of giving the index a name will not be served.  

You could easily copy all existing stats:

     collect stats on new_table from old_table;


  <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: 24 Jul 2020