Archives of the TeradataForum
Message Posted: Mon, 16 Jul 2012 @ 15:18:40 GMT
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.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|