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

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 (view raw or flat)
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

pgsql-jdbc by date

Next:From: Dave CramerDate: 2012-02-10 02:59:23
Subject: Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads
Previous:From: Steven SchlanskerDate: 2012-02-10 00:01:25
Subject: 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