I have a PostgreSQL stored procedure that moves around a very large list and makes changes to some of its elements using UPDATE.
UPDATE
Is there a way to commit these changes to iteration, and not at the end of the function? This would allow me to run the function for short periods of time, making small changes at each start.
Thank,
Adam
No, it is not currently supported for opening or closing transactions within a stored procedure, no.
, btw, , . , , 10 000 100 000 . , , , , ISAM, , - .
, , , ...
FOR all IN (select * from TABLE1) LOOP FOR some IN (select * from) LOOP INSERT INTO TABLE2 VALUES (all.id, some.id) END LOOP END LOOP
INSERT:
INSERT INTO TABLE2 SELECT all.id, some.id FROM all, some WHERE...
, . , . -, , . , , , .
Source: https://habr.com/ru/post/1733743/More articles:Gemstone Removal from GemCutter - ruby | fooobar.comHow to display a huge amount of data using gridview in asp.net without selecting whole data from a data source? - asp.netUsing one delegate for multiple methods with different parameters - c #What distinguishes between including and addressing a javascript file - javascriptHow to dynamically build a 3D object by adding paths? (Java, OpenGL) - javaCan I launch an Android app from the built-in Phone Call Log app? - androidArray index search versus Instance - performanceКак остановить сторонние приложения Erlang - erlangWhat happens if ViewState Disabled - htmlif the php class is defined as final, does it make sense to define its methods as final? - phpAll Articles