logoalt Hacker News

nopurpose • today at 11:55 AM • 2 replies • view on HN

> You can send the SET and the actual SQL command as a single String (delimited by ; obviously), so there is no additional round trip required.

This works for simple protocol only, with drawbacks like no parameter binding or re-planning of every query even if repeated.


Replies

hans_castorp • today at 12:10 PM

Ah, right. Forgot about that.

But I think the approach to decouple the actual "hint" from the query still makes more sense, than requiring a change to the original query to include it into the comments. I don't know if something like pg_stash_advice would be possible without that approach.

➕ show 1 reply
ndriscoll • today at 12:39 PM

Doesn't it still support pipelining in the extended protocol though? So still no round trip?

➕ show 1 reply