postgresql-dart icon indicating copy to clipboard operation
postgresql-dart copied to clipboard

Implement pipeline mode

Open cachapa opened this issue 1 year ago • 1 comments

From the PostgreSQL documentation:

Pipeline mode is most useful when the server is distant, i.e., network latency (“ping time”) is high, and also when many small operations are being performed in rapid succession.

cachapa avatar Mar 03 '24 20:03 cachapa

Given that all of our operations are asynchronous, I think we are effectively already doing what that documentation describes. You can just queue up multiple operations by not awaiting them directly, and the library will send them with the extended query protocol. The protocol doesn't allow running multiple statements concurrently, but interleaving the parse/bind step and the execute step for different statements should work without any additional setup.

simolus3 avatar Apr 09 '24 22:04 simolus3