For testing purposes I need to insert over 100 million records to a table. What is the best way to do it?
How to insert larger number (over 100 million) of dummy records into database table quickly?
100 Views Asked by quinnyke At
2
There are 2 best solutions below
0
On
Use an external tool to generate text file with rows in convenient format to be later imported with SQLLDR in direct mode, you can split the file to run several processes in parallel (parallel=true parameter, version 23c has even a new parameter to import in parallel from 1 invocation). Look also at transportable tablespaces to avoid downtime if you can do the import in a non-live system and attach them later to the final instance.
You can use a hierarchical query:
or a recursive query: