Hint for desktop-Oracle developers - Insert into table with NOLOGGING
Here's the trick.
I've got a table with 2,2M rows for performance testing purposes, but now I wanted to export the data to a new, partitioned table. So logical would be just to INSERT INTO, right?
Well in my case it wasn't, because the redo that would have been created as a result, would have been too much for my PC (maybe it wouldn't have been, but I didn't want to waste my time). So I searched a bit because I remembered a way to make a "direct-path insert" with no redo log.
The answer was, as always, in the fine documentation of Oracle. LOGGING is the default, as in production you surely wouldn't want to lose any data, but in development there is no need for that kind of strickness.
SQL> alter table partitionedTable nologging;
Table altered.
SQL> insert into partitionedTable select * from noPartitionsWhatsoever nologging;
2198152 rows created.
SQL> alter table partitionedTable logging;
Table altered.
I've got a table with 2,2M rows for performance testing purposes, but now I wanted to export the data to a new, partitioned table. So logical would be just to INSERT INTO, right?
Well in my case it wasn't, because the redo that would have been created as a result, would have been too much for my PC (maybe it wouldn't have been, but I didn't want to waste my time). So I searched a bit because I remembered a way to make a "direct-path insert" with no redo log.
The answer was, as always, in the fine documentation of Oracle. LOGGING is the default, as in production you surely wouldn't want to lose any data, but in development there is no need for that kind of strickness.
SQL> alter table partitionedTable nologging;
Table altered.
SQL> insert into partitionedTable select * from noPartitionsWhatsoever nologging;
2198152 rows created.
SQL> alter table partitionedTable logging;
Table altered.