Skip site navigation (1) Skip section navigation (2)

Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads

From: th76 <teunhoogendoorn(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads
Date: 2012-02-10 08:56:28
Message-ID: 0f8b91e5-39c2-482d-9b02-6d225eff4efc@m24g2000yqb.googlegroups.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
On 10 feb, 01:01, ste(dot)(dot)(dot)(at)likeness(dot)com (Steven Schlansker) wrote:
> Hi,
>
> There is a bug report and associated mailing list thread
> [JDBC] [BUGS] BUG #6293: JDBC driver performance, dated Nov 15 2011
>
>
>
> >>> The following bug has been logged online:
>
> >>> Bug reference:      6293
> >>> PostgreSQL version: 9.1
> >>> Description:        JDBC driver performance
> >>> Details:
>
> >> The 9.1 JDBC driver was changed to try and fetch all metadata for the
> >> entire resultset in one query instead of potentially issuing multiple
> >> queries for each column.  So this change was supposed to improve things.
>
> >> Looking at the code, the caching pattern has changed slightly, so now it's
> >> important to hold onto the same ResultSetMetaData instance.  That is you
> >> need to do:
>
> I have a proposed fix available as a pull request on GitHub.  The commit itself is here:https://github.com/NessComputing/pgjdbc/commit/15dee25198c0a7a4d3bdec...
>
> and the pull request complete with an in-progress discussion is here:https://github.com/pgjdbc/pgjdbc/pull/1
>
> I requested guidance on the mailing list last week on the best way to approach this problem,
> but there were no responses, so I have changed the ResultSet to cache the MetaData instances.
>
> As best as I can tell the MetaData is immutable, so hopefully there will be no ill effects from
> caching instances.
>
> I saw some discussion about licensing re: GitHub on the mailing list the other day, so to be
> perfectly clear I am releasing this code to the pgsql-jdbc project under whatever terms they
> so choose, or the public domain if that is the appropriate choice.
>
> I hope this will be an example of how moving to GitHub pull requests can be a positive change :-)
>
> I believe this fixes the referenced bug, and I've asked the original submitter to test out my change
> to see if it fixes it for him.
>
> Regards,
> Steven Schlansker
> Ness Computing
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-j(dot)(dot)(dot)(at)postgresql(dot)org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-jdbc

Hi Steven,

I've tested your patch and it works great!

Thanks,

Teun Hoogendoorn

In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2012-02-10 09:09:11
Subject: Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads
Previous:From: Steven SchlanskerDate: 2012-02-10 07:47:41
Subject: Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group