You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
When fetching type information for the varbit builtin types, poor performance can be encountered on high latency connections since OID information needs to be fetched from the database. Since this is a builtin type, we can add this directly into the TypeInfoCache to avoid queries for fetching type information for prepared statements.
Driver Version?
latest
Java Version?
any
OS Version?
MacOS Ventura
PostgreSQL Version?
16
To Reproduce
Making a query to fetch varbit column in a prepared statement and execute it, and observe on slower conection's this fetch adds to the execution time.
Expected behaviour
Because of the network latency, we initially have an extra round trip on a connection fetch type information.
Possible fix
Adding this information to TypeInfoCache would avoid overhead. It also makes logical sense since it's a built-in type. I know there is #908 to add proper support, but the proposal is to map this to TYPES.OTHER and java.lang.String similar to the metadata fetch.
The text was updated successfully, but these errors were encountered:
fqazi
added a commit
to fqazi/pgjdbc
that referenced
this issue
Oct 2, 2023
Currently, extra queries are needed to resolve type information for the
varbit type, even though the OID and type information are entirely
predictable. This patch will adds the builtin type into the TypeInfoCache,
to avoid extra round trips on high latency connections.
Fixes: pgjdbc#2959
Currently, extra queries are needed to resolve type information for the
varbit type, even though the OID and type information are entirely
predictable. This patch will adds the builtin type into the TypeInfoCache,
to avoid extra round trips on high latency connections.
Fixes: #2959
Please read https://stackoverflow.com/help/minimal-reproducible-example
Describe the issue
When fetching type information for the varbit builtin types, poor performance can be encountered on high latency connections since OID information needs to be fetched from the database. Since this is a builtin type, we can add this directly into the TypeInfoCache to avoid queries for fetching type information for prepared statements.
Driver Version?
latest
Java Version?
any
OS Version?
MacOS Ventura
PostgreSQL Version?
16
To Reproduce
Making a query to fetch varbit column in a prepared statement and execute it, and observe on slower conection's this fetch adds to the execution time.
Expected behaviour
Because of the network latency, we initially have an extra round trip on a connection fetch type information.
Possible fix
Adding this information to TypeInfoCache would avoid overhead. It also makes logical sense since it's a built-in type. I know there is #908 to add proper support, but the proposal is to map this to TYPES.OTHER and java.lang.String similar to the metadata fetch.
The text was updated successfully, but these errors were encountered: