Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 16 Jul 2012 @ 15:18:40 GMT

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

Subj:   Re: Insert into table with same select is too slow
From:   debojit.pal

Hi Jayarajesh,

Please share the explain plan for the insert query if you can. Your select query is fetching data quickly which means there is no problem with your select statement. The problem might lie with the target table. Check if it has a unique primary index defined on it. Is your target table too huge in size? Check what other indexes the target table has defined on it.

There is a 99% chance that the target table does not have a unique primary index and the resultset of your select query is not unique too in terms of the index of the target table.

If non unique primary index is the culprit, then try breaking up your insert query into several parts (i.e. if there is an option) based on some other column(s) so that you work with smaller resultsets.



  <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: 28 Jun 2020