performance issue: a lot of pg_catalog queries from info.c

Поиск
Список
Период
Сортировка
От Pliszka, Jacek
Тема performance issue: a lot of pg_catalog queries from info.c
Дата
Msg-id 4B9996AA8F503F4B8333DBC7802D6B9409C9BCF2@G5W2715.americas.hpqcorp.net
обсуждение исходный текст
Список 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

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Pavel Raiskup
Дата:
Сообщение: Re: [PATCH] Silence GCC warnings, fix build
Следующее
От: Hiroshi Saito
Дата:
Сообщение: Re: [PATCH] Silence GCC warnings, fix build