Is there any performance benefits in
INSERT INTO table1( column1) select * from table2;
against
BEGIN
FOR t2Row IN SELECT * FROM table2 LOOP
EXECUTE 'INSERT INTO ...'
END LOOP;
END;
Mostly interesting in postgresql db engine. I believe that first query consume more memory since it buffer whole result, but is first query faster ?