Re: Memory usage / concept - Mailing list pgsql-general

From Jakub Ouhrabka
Subject Re: Memory usage / concept
Date
Msg-id Pine.LNX.4.44.0208051502120.6336-100000@server
Whole thread Raw
In response to Memory usage / concept  (Valerie Schneider DSI/DEV <Valerie.Schneider@meteo.fr>)
List 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.Schneider@meteo.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
>


pgsql-general by date:

Previous
From: Christian Ullrich
Date:
Subject: Julian day calculation is wrong (strictly speaking)
Next
From: Tom Lane
Date:
Subject: Re: O'Reilly Open Source Convention Report