Re: large table problem

From: "Jason Nerothin" <jasonnerothin(at)gmail(dot)com>
To: "Kris Jurka" <books(at)ejurka(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: large table problem
Date: 2007-05-02 22:44:42
Message-ID: f42b58b90705021544k551ef7e1j3303e95acea9174a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for the redirect... After profiling my client memory usage and using
the built-in cursor functionality I discovered that another part of my
program was causing the memory overflow and that the ResultSet iteration was
doing exactly what it should have all along.

On 4/21/07, Kris Jurka <books(at)ejurka(dot)com> wrote:
>
>
>
> On Fri, 20 Apr 2007, Jason Nerothin wrote:
>
> > I'm trying to work my way around a large query problem.
> >
> > Not too unexpectedly, the app server (EJB3/JPA) is choking on the
> queries
> > which are "unnamed native queries" in Java parliance. Work-around
> attempt 1
> > was to call directly to the JDBC driver, but the cursor doesn't dispose
> of
> > the memory in the ResultSet once I've passed it by (OutOfMemoryError)
> and
> > the documentation suggests that cursor behavior is a little buggy for
> the
> > current postgres driver. (The docs suggest implementing a custom stored
> > procedure to provide iteration.)
>
> I'm not sure what documentation you're reading:
>
> http://jdbc.postgresql.org/documentation/82/query.html#query-with-cursor
>
> and it works as adverstised.
>
> Kris Jurka
>

--
========================================================
Jason Nerothin
Programmer/Analyst IV - Database Administration
UCLA-DOE Institute for Genomics & Proteomics
Howard Hughes Medical Institute
========================================================
611 C.E. Young Drive East | Tel: (310) 206-3907
105 Boyer Hall, Box 951570 | Fax: (310) 206-3914
Los Angeles, CA 90095. USA | Mail: jason(at)mbi(dot)ucla(dot)edu
========================================================
http://www.mbi.ucla.edu/~jason
========================================================

In response to

Browse pgsql-general by date

  From Date Subject
Next Message William Garrison 2007-05-02 22:57:12 Help tracking down error in postgres log
Previous Message Tom Lane 2007-05-02 21:59:49 Re: Have I b0rked something? Slow comparisons on "where x in (...)"