pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Luis Vilar Flores <lflores@evolute.pt>
To: pgsql-jdbc@postgresql.org
Subject: Re: bytea memory improvement - test results
Date: Fri, 06 Oct 2006 20:21:03 +0100
Message-ID: <4526AC9F.2010508@evolute.pt> (raw)
In-Reply-To: <451948B4.1060309@evolute.pt>
References: <44EB8C82.1000203@evolute.pt>
	<Pine.BSO.4.63.0609260131040.29854@leary2.csoft.net>
	<45192600.5050704@kyon.de>
	<451948B4.1060309@evolute.pt>

Hello,

These are the results from the Kris Jurka's ByteaTest2.java.
If there are more questions or someone want something else about this 
patch just ask it...

I look forward to see a new driver with this patch ...


CeleronM@1.6 1MB L2 cache
Fedora Core 5
jdk1.5.0_08
local db ver 8.1.4
jdbc driver ver 407

OLD
Time: 56261ms Mem: 2760776b
Time: 56077ms Mem: 2753088b
Time: 56181ms Mem: 2753088b
Time: 56184ms Mem: 2753088b
Time: 56259ms Mem: 2753088b

NEW
Time: 34603ms Mem: 1859656b
Time: 34438ms Mem: 1852776b
Time: 34409ms Mem: 1852776b
Time: 34610ms Mem: 1852776b
Time: 34496ms Mem: 1852776b


G5@1.8 512KB L2 cache
Mac OS X 10.4.8
jdk1.5.0_06
remote db ver 8.1.4(on LAN)
jdbc driver ver 407

OLD
Time: 130390ms Mem: 2812064b
Time: 131060ms Mem: 2811776b
Time: 131039ms Mem: 2811776b
Time: 131627ms Mem: 2811776b
Time: 131772ms Mem: 2811776b

NEW
Time: 83940ms Mem: 1911752b
Time: 83244ms Mem: 1911464b
Time: 83350ms Mem: 1911464b
Time: 83457ms Mem: 1911464b
Time: 83610ms Mem: 1911464b

Attachments:

ByteaTest2.java (text/x-java, 934B) download import java.sql.*; public class ByteaTest2 { public static void main(String args[]) throws Exception { Class.forName("org.postgresql.Driver"); Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/test_bytea","postgres",""); for (int k=0; k<5; k++) { long t1 = System.currentTimeMillis(); long total = 0; for (int j=0; j<10; j++) { PreparedStatement pstmt = conn.prepareStatement("SELECT varcharsend(repeat(?,?))"); pstmt.setString(1, "a\\001"); pstmt.setInt(2, 150000); ResultSet rs = pstmt.executeQuery(); rs.next(); for (int i=0; i<100; i++) { byte b[] = rs.getBytes(1); total += b.length; } rs.close(); pstmt.close(); } long t2 = System.currentTimeMillis(); long usedMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); System.out.println("Time: " + ( t2-t1 ) + "ms Mem: " + usedMem + "b" ); } } }

Message-ID: <4526AC9F.2010508@evolute.pt>
Permalink:  ../4526AC9F.2010508@evolute.pt/
Also on:    postgresql.org/message-id/4526AC9F.2010508@evolute.pt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: lflores@evolute.pt
  Subject: Re: bytea memory improvement - test results
  In-Reply-To: <4526AC9F.2010508@evolute.pt>
  References: <44EB8C82.1000203@evolute.pt> <Pine.BSO.4.63.0609260131040.29854@leary2.csoft.net> <45192600.5050704@kyon.de> <451948B4.1060309@evolute.pt> <4526AC9F.2010508@evolute.pt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox