-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transparently receive parameters in binary format when possible
When preparing a statement for repeated execution (as opposed to just parameterizing a single query using the unnamed statement) we get to know the types of the resulting columns before we have to decide which ones to receive in binary and which ones in text. We can use that to our advantage to transparently avoid unnecessary binary -> text -> binary conversions. This has been shown in some cases to provide massive performance benefits, with little to no penalty even in the pathological case. But just to err on the safe side, an option for disabling this feature is provided, disable_prepared_binary_result. It is not documented in the user-facing documentation since its use is expected to be practically nonexistent. In the current state of affairs, only bytea and int8/int4/int2 values are requested in binary from the server. Floats and time-related types are probably the next types to get the same treatment. Chris Bandy and Marko Tiikkaja
- Loading branch information
Showing
5 changed files
with
207 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.