Re: High memory usage / performance issue ( temp tables ? ) - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: High memory usage / performance issue ( temp tables ? )
Date
Msg-id CAFj8pRD-LEAcAtPVu1efnnyHtaX32tg7NkwX9XNeAH57ptLUpQ@mail.gmail.com
Whole thread Raw
In response to Re: High memory usage / performance issue ( temp tables ? )  (gmb <gmbouwer@gmail.com>)
List pgsql-sql



2014-08-18 13:20 GMT+02:00 gmb <gmbouwer@gmail.com>:
Just to make sure I understand this correct : > You can write PostgreSQL extension in C - and store XML only in memory. Meaning that I write function(s) which processes the XML using C which will allow me more option with processing the XML ? Will this allow me to cache the payload data in memory for the connection and not only for a single function ? If not , this approach will not work , unless I rewrite a lot of the code / functions. The current solution makes use of a separate function for each different part of the XML. Reason for this is that a lot of validation is also done on the data. > Temp tables are best when you do some queries or when you need indexes, but > it is terrible slow cache. > > else - Postgres is good as database and very slow as cache. It is good for > prototyping and for less or middle load servers. For any other use > different software So your point is that the use of temp tables in this kind of scenario is not vey efficient. I'll then try to replace the temp tables with actual tables with some kind of UID. Thanks for the response. gmb

Postgres has own memory management

data can live in shared memory context (across connections), session memory context, transaction memory context or query memory context.


Regards

Pavel

 
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

pgsql-sql by date:

Previous
From: gmb
Date:
Subject: Re: High memory usage / performance issue ( temp tables ? )
Next
From: Adrian Klaver
Date:
Subject: Re: function call