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
I am using version 9.3-1101 of the JDBC driver against a 9.3 PostgreSQL database.
Apparently the JDBC driver is performing one "metadata query" for each of my regular queries against the DB, which seems to dramatically impact the performance of my applications.
The metadata query looks like this:
SELECT c.oid, a.attnum, a.attname, c.relname, n.nspname, a.attnotnull OR (t.typtype = 'd' AND t.typnotnull), pg_catalog.pg_get_expr(d.adbin, d.adrelid) LIKE '%nextval(%' FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (c.oid = a.attrelid) JOIN pg_catalog.pg_type t ON
(a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef d ON (d.adrelid = a.attrelid AND d.adnum = a.attnum) JOIN (SELECT 45572361 AS oid , 1 AS attnum UNION ALL SELECT 45572361, 2 UNION ALL SELECT 45572361, 4 UNION ALL SELECT 45572361, 6 UNION ALL SELECT 45572361, 9 UNION ALL SELECT 45572361, 17 UNION ALL SELECT 45572361, 18 UNION ALL SELECT 45572361,
19 UNION ALL SELECT 45572361, 22 UNION ALL SELECT 45572361, 20 UNION ALL SELECT 45572361, 21 UNION ALL SELECT 45572361, 23 UNION ALL SELECT 45572361, 25 UNION ALL SELECT 45572361, 27 UNION ALL SELECT 45572361, 69 UNION ALL SELECT 45572361, 30 UNION ALL SELECT 45572361, 32 UNION ALL SELECT 45572361, 34 UNION ALL SELECT 45572361, 35 UNION ALL SELECT
45572361, 36 UNION ALL SELECT 45572361, 39 UNION ALL SELECT 45572361, 64 UNION ALL SELECT 45572361, 5 UNION ALL SELECT 45572361, 41 UNION ALL SELECT 45572361, 43 UNION ALL SELECT 45572361, 45 UNION ALL SELECT 45572361, 54 UNION ALL SELECT 45572361, 56 UNION ALL SELECT 45572361, 31 UNION ALL SELECT 45572361, 59 UNION ALL SELECT 45572361, 60 UNION ALL
SELECT 45572361, 67 UNION ALL SELECT 45572361, 61 UNION ALL SELECT 45572361, 62 UNION ALL SELECT 45572361, 65 UNION ALL SELECT 45572361, 57 UNION ALL SELECT 45572361, 63 UNION ALL SELECT 45572361, 7 UNION ALL SELECT 45572361, 8 UNION ALL SELECT 45572361, 24 UNION ALL SELECT 45572361, 48 UNION ALL SELECT 45572361, 49 UNION ALL SELECT 45572361, 58
UNION ALL SELECT 45572361, 3 UNION ALL SELECT 45572361, 68 UNION ALL SELECT 45572361, 52 UNION ALL SELECT 45572361, 66 UNION ALL SELECT 45572305, 3 UNION ALL SELECT 45572305, 8 UNION ALL SELECT 45572305, 2) vals ON (c.oid = vals.oid AND a.attnum = vals.attnum)
SELECT c.oid, a.attnum, a.attname, c.relname, n.nspname, a.attnotnull OR (t.typtype = 'd' AND t.typnotnull), pg_catalog.pg_get_expr(d.adbin, d.adrelid) LIKE '%nextval(%' FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (c.oid = a.attrelid) JOIN pg_catalog.pg_type t ON
(a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef d ON (d.adrelid = a.attrelid AND d.adnum = a.attnum) JOIN (SELECT 45572305 AS oid , 1 AS attnum UNION ALL SELECT 45572305, 17 UNION ALL SELECT 45572305, 34 UNION ALL SELECT 45572305, 9 UNION ALL SELECT 45572305, 18 UNION ALL SELECT 45572305, 24 UNION ALL SELECT 45572305, 28 UNION ALL SELECT
45572305, 16 UNION ALL SELECT 45572305, 22 UNION ALL SELECT 45572305, 12 UNION ALL SELECT 45572305, 14 UNION ALL SELECT 45572305, 10 UNION ALL SELECT 45572305, 4 UNION ALL SELECT 45572305, 20 UNION ALL SELECT 45572305, 11 UNION ALL SELECT 45572305, 29 UNION ALL SELECT 45572305, 37 UNION ALL SELECT 45572305, 35 UNION ALL SELECT 45572305, 8 UNION ALL
SELECT 45572305, 30 UNION ALL SELECT 45572305, 3 UNION ALL SELECT 45572305, 19 UNION ALL SELECT 45572305, 7 UNION ALL SELECT 45572305, 2 UNION ALL SELECT 45572305, 13 UNION ALL SELECT 45572305, 15 UNION ALL SELECT 45572305, 23 UNION ALL SELECT 45572305, 26 UNION ALL SELECT 45572305, 36) vals ON (c.oid = vals.oid AND a.attnum = vals.attnum)
SELECT c.oid, a.attnum, a.attname, c.relname, n.nspname, a.attnotnull OR (t.typtype = 'd' AND t.typnotnull), pg_catalog.pg_get_expr(d.adbin, d.adrelid) LIKE '%nextval(%' FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (c.oid = a.attrelid) JOIN pg_catalog.pg_type t ON
(a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef d ON (d.adrelid = a.attrelid AND d.adnum = a.attnum) JOIN (SELECT 45572305 AS oid , 1 AS attnum UNION ALL SELECT 45572305, 3 UNION ALL SELECT 45572305, 8 UNION ALL SELECT 45572305, 2 UNION ALL SELECT 45572305, 42 UNION ALL SELECT 45572305, 41 UNION ALL SELECT 45572305, 35 UNION ALL SELECT 45572305,
4 UNION ALL SELECT 45572305, 37) vals ON (c.oid = vals.oid AND a.attnum = vals.attnum)
@davecramer Yes, I can upgrade the driver in my environment.
I just wonder if there could be any issue when connecting with the 9.4 driver to a 9.3 database. Can I be sure that it is totally safe?
@davecramerhttps://github.com/davecramer Yes, I can upgrade the driver
in my environment.
I just wonder if there could be any issue when connecting with the 9.4
driver to a 9.3 database. Can I be sure that it is totally safe?
—
Reply to this email directly or view it on GitHub #339 (comment).
Dear All,
I am using version 9.3-1101 of the JDBC driver against a 9.3 PostgreSQL database.
Apparently the JDBC driver is performing one "metadata query" for each of my regular queries against the DB, which seems to dramatically impact the performance of my applications.
The metadata query looks like this:
Is this related to BUG #6293?
http://www.postgresql.org/message-id/201111150859.pAF8xKZW012012@wwwmaster.postgresql.org
If so, has it been fixed in newer versions of the driver?
Is there any way to avoid this strange behavior?
The text was updated successfully, but these errors were encountered: