Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TKIYl-00017V-KF for pgsql-jdbc@postgresql.org; Sat, 06 Oct 2012 00:48:03 +0000 Received: from mail63.csoft.net ([205.205.214.4]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TKIYi-0008RZ-Cg for pgsql-jdbc@postgresql.org; Sat, 06 Oct 2012 00:48:03 +0000 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 2848A2840D; Fri, 5 Oct 2012 20:47:58 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 9523EA31D; Fri, 5 Oct 2012 20:47:57 -0400 (EDT) Date: Fri, 5 Oct 2012 20:47:57 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Eyal Wilde cc: pgsql-jdbc@postgresql.org Subject: Re: bug report: slow getColumnTypeName In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 X-Pg-Spam-Score: -4.0 (----) Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Archive-Number: 201210/18 X-Sequence-Number: 23342 On Fri, 5 Oct 2012, Eyal Wilde wrote: >=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Res= ultSetMetaData __md =3D __rs.getMetaData(); =C2=A0 =C2=A0//this > is fine > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Str= ing __sf1name =3D __md.getColumnName(1); =C2=A0 =C2=A0 =C2=A0=C2=A0//this > is fine > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 int= __if1type =3D __md.getColumnType(1); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 > =C2=A0//this is fine > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Str= ing __sf1type =3D __md.getColumnTypeName(1);=C2=A0//this is > SLOW!! ~15msec >=20 getColumnTypeName requires going back to the server to fetch the=20 additional information about the source table that is not needed for=20 just getColumnType. So naturally that takes longer. Kris Jurka=