[postgis-users] JDBC OutofMemoryError

Akira Komo forreg at mail.com
Thu Aug 4 10:42:19 PDT 2005


Gustavo,

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, :).

In my case, each record contains only 1. I'm so confusing.  how could it
get OutOfMemoryError?    

Thank you again for your kind assistant.


-- Kai

  ----- Original Message -----
  From: "Gustavo Henrique Sberze Ribas"
  To: "PostGIS Users Discussion"
  Subject: RE: [postgis-users] JDBC OutofMemoryError
  Date: Thu, 4 Aug 2005 08:02:08 -0300

  >
  > Hello,
  >
  > A few things to try out:
  >
  > - Narrow down your search (use WHERE);
  > - Limit the number of rows returned (use LIMIT);
  > - Give Java more memory: java -Xmx512M MyProgram
  >
  >
  > --
  > Gustavo
  >
  > -----Original Message-----
  > From: postgis-users-bounces at postgis.refractions.net
  > [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
  > Akira Komo
  > Sent: Wednesday, August 03, 2005 5:28 PM
  > To: postgis-users at postgis.refractions.net
  > Subject: [postgis-users] JDBC OutofMemoryError
  >
  >
  > Dear all,
  > I have two small tables arizona_geo and colorado_geo in PostGIS
  > which were converted from two shapefiles. Each of them has only
  > several hundreds records. When I tried to issue a very simple query
  via
  > JDBC connection, I always got an OutOfMemoryError. One example
  > query is
  > select 1 from arizona_geo X, colorado_geo Y
  > I tried different postgresql JDBC driver with postgis extension,
  basically
  > I got the same error. I am very appreciated if somebody can give me
  an
  > idea to solve this problem.
  > -- Kumo
  >
  >
  >
  > --
  > ___________________________________________________________
  > Sign-up for Ads Free at Mail.com
  > http://www.mail.com/?sr=signup
  > _______________________________________________
  > postgis-users mailing list
  > postgis-users at postgis.refractions.net
  > http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050804/cddac28e/attachment.html>


More information about the postgis-users mailing list