flyway - executing more than one statement at once -
from see, flyway when given sql file statements executes them 1 one using ; delimiter (that understood sqlscript.execute()). because of applying patches on remote server takes lot of time, because each statement of file send individually.
i wonder if possible "batch update" sending whole file in 1 piece , apply @ once. or maybe jdbc constraint struggle against here?
your observation correct.
flyway splits files in single statements, sent dbms using jdbc.
some dbmss jdbc drivers, such ones h2 , postgresql, natively support sending more 1 statement per jdbc call.
the reason chose not use trade error reporting quality potential performance gains. on top of that, solution available minorty of users.
batch updates indeed cross-dbms solution problem. batching whole file not ideal, due potential size explosion , law of diminishing returns. batching few statements (say 20, 50, or whatever sweet spot turns out be) prove valuable. should not impact code much. in case error reporting quality (which statement failed) not measurably affected , performance improvements visible, adding should no-brainer.
please raise issue in issue tracker if see supported.
Comments
Post a Comment