Fwd: [pgjdbc] Change Jdbc4ResultSet to cache Jdbc4ResultSetMetaData instances (#1)

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Fwd: [pgjdbc] Change Jdbc4ResultSet to cache Jdbc4ResultSetMetaData instances (#1)
Date: 2012-02-10 00:50:13
Message-ID: CADK3HH+c6NQ4NFU_Fz3bonaXQUaSLyJBLYXW-Tnu2+-XhyB7ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Forwarding this to the list.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

---------- Forwarded message ----------
From: Steven Schlansker
<reply+i-3165615-a9adaf19c31f0ad7919226777365c7fb396d186b-406518(at)reply(dot)github(dot)com>
Date: Thu, Feb 9, 2012 at 6:37 PM
Subject: [pgjdbc] Change Jdbc4ResultSet to cache
Jdbc4ResultSetMetaData instances (#1)
To: Dave Cramer <davecramer(at)gmail(dot)com>

This dramatically improves performance with regards to
metadata-intensive operations. The original motivation is that without
caching, each call to a ResultSet.updateXXX method would retrieve a new
instance of the metadata, causing an entire query to be run.  If you
update many columns in the same row, the cost came to be very expensive.

Performance may improve in other workloads as well, but this has not been
measured.

You can merge this Pull Request by running:

 git pull https://github.com/NessComputing/pgjdbc master

Or you can view, comment on it, or merge it online at:

 https://github.com/pgjdbc/pgjdbc/pull/1

-- Commit Summary --

* Change the ResultSet to cache ResultSetMetaData instances.

-- File Changes --

M org/postgresql/jdbc4/Jdbc4ResultSet.java (10)

-- Patch Links --

 https://github.com/pgjdbc/pgjdbc/pull/1.patch
 https://github.com/pgjdbc/pgjdbc/pull/1.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/pgjdbc/pgjdbc/pull/1

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2012-02-10 02:59:23 Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads
Previous Message Steven Schlansker 2012-02-10 00:01:25 Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads