From: | "Pliszka, Jacek" <jacek(dot)pliszka(at)hp(dot)com> |
---|---|
To: | "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org> |
Subject: | performance issue: a lot of pg_catalog queries from info.c |
Date: | 2013-12-12 20:26:35 |
Message-ID: | 4B9996AA8F503F4B8333DBC7802D6B9409C9BCF2@G5W2715.americas.hpqcorp.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi!
I’ve compared queries sent by PostgreSQL and MySQL ODBC driver and I’ve noticed that PG has thousands of queries like
Below which are not present in MySQL and what is one of the main reasons why PG ODBC is significantly slower:
SELECT ta.attname, ia.attnum, ic.relname, n.nspname, tc.relname
FROM pg_catalog.pg_attribute ta, pg_catalog.pg_attribute ia, pg_catalog.pg_class tc,
pg_catalog.pg_index i, pg_catalog.pg_namespace n, pg_catalog.pg_class ic
WHERE tc.oid = 17195
AND tc.oid = i.indrelid
AND n.oid = tc.relnamespace
AND i.indisprimary = 't'
AND ia.attrelid = i.indexrelid
AND ta.attrelid = i.indrelid
AND ta.attnum = i.indkey[ia.attnum-1]
AND (NOT ta.attisdropped)
AND (NOT ia.attisdropped)
AND ic.oid = i.indexrelid
ORDER BY ia.attnum
My uneducated guess is that these queries come from info.c line 3795.
Do they really have to be send to backend so often ? In one minute the above query for 17195 was sent
312 times, for 16774 311 times etc.
Every 3rd query was of this type!
Is there any option in the driver that could disable sending so many queries of this type?
BR,
Jacek
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Saito | 2013-12-13 14:46:09 | Re: [PATCH] Silence GCC warnings, fix build |
Previous Message | Pavel Raiskup | 2013-12-12 13:28:11 | Re: [PATCH] Silence GCC warnings, fix build |