Subject Proper way for copy data from big table
Author liviuslivius
what is the proper way for copy data from big table to another database
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
but if we do this in steps 
SELECT FIRST 1000000 SKIP 0 * FROM SOURCE_TABLE <-we got 1000000 reads -> ok
SELECT FIRST 1000000 SKIP 1000000  * FROM SOURCE_TABLE <-we got 2000000 reads -> not ok
SELECT FIRST 1000000 SKIP 2000000  * FROM SOURCE_TABLE <-we got 3000000 reads -> not ok worser and worser (slower and slower)
Karol Bieniaszewski