From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | gmb <gmbouwer(at)gmail(dot)com> |
Cc: | postgres list <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: High memory usage / performance issue ( temp tables ? ) |
Date: | 2014-08-18 12:29:45 |
Message-ID: | CAFj8pRD-LEAcAtPVu1efnnyHtaX32tg7NkwX9XNeAH57ptLUpQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
2014-08-18 13:20 GMT+02:00 gmb <gmbouwer(at)gmail(dot)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.
Some prototype you can write in plperl
http://www.postgresql.org/docs/9.3/static/plperl-global.html
Regards
Pavel
> ------------------------------
> View this message in context: Re: High memory usage / performance issue (
> temp tables ? )
> <http://postgresql.1045698.n5.nabble.com/High-memory-usage-performance-issue-temp-tables-tp5815108p5815206.html>
> Sent from the PostgreSQL - sql mailing list archive
> <http://postgresql.1045698.n5.nabble.com/PostgreSQL-sql-f2142323.html> at
> Nabble.com.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-08-18 22:16:53 | Re: function call |
Previous Message | gmb | 2014-08-18 11:20:34 | Re: High memory usage / performance issue ( temp tables ? ) |