postgresql-dart
postgresql-dart copied to clipboard
Implement pipeline mode
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.
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.