Re: [SQL] to do's?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Clayton Cottingham <drfrog(at)smartt(dot)com>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] to do's?
Date: 1999-09-15 13:53:02
Message-ID: 19073.937403582@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Clayton Cottingham <drfrog(at)smartt(dot)com> writes:
> hi i was wondering if multi threading will be enabled soon?

Huh? We already have multiple backends, what advantage would
there be to using threads?

> is that i have a 1.3 mil row db when i try to select all i get memory
> out type errors, either system wide or droping the backend

The problem is probably at the application end --- libpq is built on
the model that it can collect the entire query result in memory and
then give the application random access to that array. So if the
query result won't fit in the space available to the application,
trouble. I don't see why this would affect anything else in your
system, though, unless the app uses up all available swap space and
holds it for a while before crashing...

What you probably want to do instead of a straight SELECT is use
DECLARE CURSOR and FETCH to retrieve the table a few dozen/hundred
rows at a time.

regards, tom lane

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 1999-09-15 14:00:02 Re: [HACKERS] Permission problem with COPY FROM
Previous Message Tom Lane 1999-09-15 13:46:35 Re: [HACKERS] BUG with UNIQUE clause