Skip to content

Single roundtrip mode for Queryer #209

Closed
@johto

Description

@johto

I saw some numbers which suggested that pq's Queryer interface could use some performance improvements when using parameters. I had a look at how much the numbers improve if we do a single roundtrip to the server with an unnamed prepared statement (crude PoC patch can be found here). As written, this would require effectively reverting 6235e1b, which would be a huge backwards compatibility breakage, but I think there's a way around that if we use the binary interface for strings and bytea; that would eliminate the need to look at the types of the bind parameters, as far as I can tell.

I got around 40% performance improvement out of this on the benchmark in the patch when running over TCP against localhost. With a remote server the numbers would probably be even bigger, so this might be worth pursuing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions