<P>Gustavo,</P>
<P>I tried to give more memory to Java Virtual Machine, It doesn't help. I think a JDBC driver should not depend on the size of a ResultSet, otherwise how I can fetch all the records from a huge database. I wrote a JDBC driver for a previous project before. Actually we have a buffer at the client side, each time only 256 records were downloaded from the server, when a user calls next() 256 times, we download another chunk records of 256 records into the buffer. So no matter how large the resultset is, it doesn't matter at the client side. At least no OutOfMemoryError unless the resultset has thousands columns, :).</P>
<P>In my case, each record contains only 1. I'm so confusing. how could it get OutOfMemoryError? <BR></P>
<P>Thank you again for your kind assistant.</P>
<P><BR>-- Kai</P>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">----- Original Message ----- <BR>From: "Gustavo Henrique Sberze Ribas" <GRIBAS@CPQD.COM.BR><BR>To: "PostGIS Users Discussion" <POSTGIS-USERS@POSTGIS.REFRACTIONS.NET><BR>Subject: RE: [postgis-users] JDBC OutofMemoryError <BR>Date: Thu, 4 Aug 2005 08:02:08 -0300 <BR><BR>> <BR>> Hello, <BR>> <BR>> A few things to try out: <BR>> <BR>> - Narrow down your search (use WHERE); <BR>> - Limit the number of rows returned (use LIMIT); <BR>> - Give Java more memory: java -Xmx512M MyProgram <BR>> <BR>> <BR>> -- <BR>> Gustavo <BR>> <BR>> -----Original Message----- <BR>> From: postgis-users-bounces@postgis.refractions.net <BR>> [mailto:postgis-users-bounces@postgis.refractions.net]On Behalf Of <BR>> Akira Komo <BR>> Sent: Wednesday, August 03, 2005 5:28 PM <BR>> To: postgis-users@postgis.refractions.net <BR>> Subject: [postgis-users] JDBC OutofMemoryError <BR>> <BR>> <BR>> Dear all, <BR>> I have two small tables arizona_geo and colorado_geo in PostGIS <BR>> which were converted from two shapefiles. Each of them has only <BR>> several hundreds records. When I tried to issue a very simple query via <BR>> JDBC connection, I always got an OutOfMemoryError. One example <BR>> query is <BR>> select 1 from arizona_geo X, colorado_geo Y <BR>> I tried different postgresql JDBC driver with postgis extension, basically <BR>> I got the same error. I am very appreciated if somebody can give me an <BR>> idea to solve this problem. <BR>> -- Kumo <BR>> <BR>> <BR>> <BR>> -- <BR>> ___________________________________________________________ <BR>> Sign-up for Ads Free at Mail.com <BR>> http://www.mail.com/?sr=signup <BR>> _______________________________________________ <BR>> postgis-users mailing list <BR>> postgis-users@postgis.refractions.net <BR>> http://postgis.refractions.net/mailman/listinfo/postgis-users <BR></BLOCKQUOTE><BR>
--
<p>___________________________________________________________<br>Sign-up for Ads Free at Mail.com<br>
<a href="http://mail01.mail.com/scripts/payment/adtracking.cgi?bannercode=adsfreejump01" target="_blank">http://www.mail.com/?sr=signup</a></p>