Hello ,
Database :- Oracle 19c Standard edition
we are trying to Insert around 450 million records from Table A into Table B using the below query
insert into table a (col1,col2,col3,col4,...,col31 in)
select col1,col2,col3,col4,...,col31 in from table b;
this query is been executing for 7+hrs.
we checked the V$session_longops around 6hrs ago (03.30am IST) and it was showing a remaining time of around 288 mins with ~17% completion rate.
when we are checking it now it shows 280 mins as time remaining after 7+ hrs
We have made all indexes unusable as well on the table.
the DBA team is also monitoring and don't see any resource crunch or tablespace issues.
is there a way to improve this.
Thanks
Several hours to insert 450 million rows is excessive. If the query really is just reading from one table and you've disabled indexes there's not a huge amount you can do to tune the statement.
It sounds like the insert is stuck waiting on... something. To figure out what Tanel Poder's snapper script can come in handy here:
https://github.com/tanelpoder/tpt-oracle/blob/master/snapper.sql Until we have this information there's minimal help we can give - we're just guessing what the problem is.