Re: bug report: slow getColumnTypeName

Поиск
Список
Период
Сортировка
От dmp
Тема Re: bug report: slow getColumnTypeName
Дата
Msg-id 50745541.8060204@ttc-cmc.net
обсуждение исходный текст
Ответ на Re: bug report: slow getColumnTypeName  (Eyal Wilde <eyal.wilde@gmail.com>)
Ответы Re: bug report: slow getColumnTypeName  (Luis Flores <luiscamposflores@gmail.com>)
Список pgsql-jdbc
Eyal Wilde wrote:
> I verified with wireshark that  getColumnTypeName indeed do a request to
> the postgres server. This happens with 9.1-901 and 9.1-903 BUT NOT WITH
> 9.0-801!!
>
> So, the reason for the slowness seems to be obviouse now.
>
> it will take me some time to wrap up it into a test case. I would realy
> like to help, but please let me know if it's realy necessary.
>
> On Oct 5, 2012 1:07 AM, "Eyal Wilde" <eyal@impactsoft.co.il
> <mailto:eyal@impactsoft.co.il>> wrote:
>
>
>                          ResultSetMetaData __md = __rs.getMetaData();
>       //this is fine
>                          String __sf1name = __md.getColumnName(1);
>        //this is fine
>                          int __if1type = __md.getColumnType(1);
>             //this is fine
>                          String __sf1type =
>     __md.getColumnTypeName(1); //this is SLOW!! ~15msec
>
>     postgres server version is 9.1.5
>     jdbc version, i checked both 9.1-901 and 9.1-903
>     and... BTW, 9.0-801 works good (while connected pg9.1)!

There does appear to be a change in the code that may have created the
slowness that you are observing. Please try a a test case in which two
back to back getColumnTypeName() calls are made. Is there a difference
in time between the first and second and is there still on the second
call a request to the postgres server.

The code between 9.0-801 and later version does have a change in it
that looks like for the caching for field metadata through fetchFieldMetaData().
That method is called in the later versions for getColumnTypeName()
with isAutoIncrement(), with was also added in later versions.

danap.



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

Предыдущее
От: marc.mg75@googlemail.com
Дата:
Сообщение: Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting?
Следующее
От: BENHAMOU Mathieu
Дата:
Сообщение: Re: drop in performance using jdbc driver version 9