Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 46465 invoked from network); 4 Jan 2007 20:28:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jan 2007 20:28:26 -0000 Received: (qmail 85098 invoked by uid 500); 4 Jan 2007 20:28:30 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 85003 invoked by uid 500); 4 Jan 2007 20:28:29 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 84986 invoked by uid 99); 4 Jan 2007 20:28:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 12:28:29 -0800 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,MSGID_MULTIPLE_AT X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [194.125.145.37] (HELO mercury.propylon.com) (194.125.145.37) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 12:28:19 -0800 Received: from propylon-sdsl.sdsl.esat.net ([193.120.101.26] helo=damienmc) by mercury.propylon.com with esmtp (Exim 4.50) id 1H2ZAO-0003DB-WF for user-java@ibatis.apache.org; Thu, 04 Jan 2007 20:26:30 +0000 From: "Damien McCarthy" To: References: <006401c7302c$3c1398c0$b43aca40$@mccarthy@propylon.com> <248689.20990.qm@web58909.mail.re1.yahoo.com> In-Reply-To: <248689.20990.qm@web58909.mail.re1.yahoo.com> Date: Thu, 4 Jan 2007 20:27:51 -0000 Message-ID: <000701c7303e$cede9df0$6c9bd9d0$@mccarthy@propylon.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0008_01C7303E.CEDE9DF0" X-Mailer: Microsoft Office Outlook 12.0 Thread-index: AccwO0V3L3VVM3NcQSyYZmADHDBfIwAAZKVA Content-Language: en-gb X-SA-Exim-Connect-IP: 193.120.101.26 X-SA-Exim-Mail-From: damien.mccarthy@propylon.com Subject: RE: Getting straight at the ResultSet X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on mercury.propylon.com X-Spam-Level: X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on mercury.propylon.com) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.1 required=5.0 tests=AWL,HTML_60_70,HTML_MESSAGE autolearn=failed version=3.0.3 This is a multipart message in MIME format. ------=_NextPart_000_0008_01C7303E.CEDE9DF0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Tegan, I'm not sure which overhead you are trying to avoid.. If you want to avoid loading 100,000 objects into memory at the same time, then the RowHandler will do this for you. The row handler will walk along the resultSet and for each row call handleRow. So you would expect this method to be called 100,000 times. For example inside this method you could put code to append some of the objects properties to a file. This gives you the iterative approach you mentioned in your first mail. If you want to avoid mapping the 100,000 rows to objects at any time then why are you using ibatis at all? Just use a direct JDBC connection. Damien From: Tegan Clark [mailto:tegan.clark@yahoo.com] Sent: 04 January 2007 20:02 To: user-java@ibatis.apache.org Subject: RE: Getting straight at the ResultSet Damien/Larry, Thanks for the reply. I've looked at RowHandler, and unless I'm missing something iBATIS is still controlling the iteration and passing me a Map of the underlying data, i.e. iBATIS first incures the overhead of adapting the ResultSet to the Map, and then I must implement some sought of buffer to hold the returned results (unless I implement some sought of callback out of my DAL). Do my assumptions above sound correct? There's no way to map the ResultSet straight back? i.e: ResultSet res = (ResultSet ) sqlClient.queryForObject(); Thanks again. Tegan Damien McCarthy wrote: I have a framework that uses iBATIS to product "no-code" reports (just the xml). Some of those reports can stretch to 100,000's or records though so are better suited to an iterator approach and non-reflective mapping. If it can't be done, is this something iBATIS would be interested in having contributed? All help greatly appreciated. Thanks. Tegan __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------=_NextPart_000_0008_01C7303E.CEDE9DF0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Tegan,

 

I’m not sure which overhead you are trying to = avoid….

 

If you want to avoid loading 100,000 objects into memory = at the same time, then the RowHandler will do this for you. The row handler = will walk along the resultSet and for each row call handleRow. So you would expect = this method to be called 100,000 times. For example inside this method you = could put code to append some of the objects properties to a file. This gives you = the iterative approach you mentioned in your first = mail.

 

If you want to avoid mapping the 100,000 rows to objects = at any time then why are you using ibatis at all?  Just use a direct JDBC connection.

 

Damien

 

From:= Tegan = Clark [mailto:tegan.clark@yahoo.com]
Sent: 04 January 2007 20:02
To: user-java@ibatis.apache.org
Subject: RE: Getting straight at the = ResultSet

 

Damien/Larry,

 

Thanks for the reply.  I've looked at = RowHandler, and unless I'm missing something iBATIS is still controlling the iteration = and passing me a Map of the underlying data, i.e. iBATIS first incures the = overhead of adapting the ResultSet to the Map, and then I must implement = some sought of buffer to hold the returned results (unless I implement some = sought of callback out of my DAL).

 

Do my assumptions above sound = correct?

 

There's no way to map the ResultSet straight back? = i.e:

 

   ResultSet res =3D = (ResultSet ) sqlClient.queryForObject();

 

Thanks again.

 

Tegan

 


Damien McCarthy <damien.mccarthy@propylon.com> = wrote:

 

I have a framework that uses iBATIS to product "no-code" reports (just the xml).  Some of those reports = can stretch to 100,000's or records though so are better suited to an = iterator approach and non-reflective mapping.

 

If it can't be done, is this something iBATIS would = be interested in having contributed?

 

All help greatly appreciated.  = Thanks.

 

Tegan

 _________________________________________________= _
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

 

 __________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

------=_NextPart_000_0008_01C7303E.CEDE9DF0--