Re: Memory usage / concept

From: Jakub Ouhrabka <jouh8664(at)ss1000(dot)ms(dot)mff(dot)cuni(dot)cz>
To: Valerie Schneider DSI/DEV <Valerie(dot)Schneider(at)meteo(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Memory usage / concept
Date: 2002-08-05 13:09:14
Message-ID: Pine.LNX.4.44.0208051502120.6336-100000@server
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

i think it's your client (psql) what's actually crashing. it's attempting
to load all your rows into memory before displaying them. i'd recommend
using select * from foo order by something limit x offset y or using
cursor. i think there is no use for you to issue query like this...

see:
http://www.postgresql.org/idocs/index.php?queries-limit.html
http://www.postgresql.org/idocs/index.php?sql-declare.html
http://www.postgresql.org/idocs/index.php?sql-fetch.html

hope that helps, kuba

On Mon, 5 Aug 2002, Valerie Schneider DSI/DEV wrote:

> Hi, I'm a novice in PostgreSql. I'm used to work with Oracle. I'm testing
> PostgreSql (7.2) on linux RedHat 7.1 and Solaris 8. I have some problems
> with large queries : for example a "select * from my_table ..." and my_table
> with a size of several Gb and several Mrows. If I set the ulimit to
> "unlimited", I overflow my memory and my swap; if I limit it, my query
> crashes. In fact I don't know how PG works with the memory use :
> with Oracle I have to manage its memory space (the SGA); is there anything
> like that with PG ?
> Thanks, Valerie.
>
>
>
> ********************************************************************
> * Les points de vue exprimes sont strictement personnels et *
> * n'engagent pas la responsabilite de METEO-FRANCE. *
> ********************************************************************
> * Valerie SCHNEIDER Tel : +33 (0)5 61 07 81 91 *
> * METEO-FRANCE / DSI/DEV Fax : +33 (0)5 61 07 81 09 *
> * 42, avenue G. Coriolis Email : Valerie(dot)Schneider(at)meteo(dot)fr *
> * 31057 TOULOUSE Cedex - FRANCE http://www.meteo.fr *
> ********************************************************************
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-08-05 13:44:01 Re: O'Reilly Open Source Convention Report
Previous Message Christian Ullrich 2002-08-05 12:39:35 Julian day calculation is wrong (strictly speaking)