Subject | RE: [firebird-support] Proper way for copy data from big table |
---|---|
Author | Leyne, Sean |
Post date | 2015-06-19T14:48:44Z |
> what is the proper way for copy data from big table to another databaseActually, a result set will "spill-over" to a temporary sort file, so the amount of memory in use should not be that bad.
> if table is bigger then avaiable RAM and we need to do this in one
> transaction?
> You know if we do
> SELECT * FROM SOURCE_TABLE - and table have e.g. 400 000 000 records
> then retrive it is impossible because of RAM
Create an SP and declaring/using a Cursor, that should allow you to walk the result inserting the rows into the new table while minimizing memory consumption.
Sean