From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Seref Arikan <serefarikan(at)gmail(dot)com> |
Cc: | Peter Kroon <plakroon(at)gmail(dot)com>, Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: create table in memory |
Date: | 2012-11-27 15:50:51 |
Message-ID: | CAHyXU0zd5FdhpTv=JgysTiWmDo0WGDx4F8m-w0eM-AbidP51FQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Nov 27, 2012 at 9:44 AM, Seref Arikan <serefarikan(at)gmail(dot)com> wrote:
>> > Also I need those tables per session, so creating and dropping with TEMP
>> > tables appear to be faster.
>>
>> Performance of creating tables is going to be storage bound. what are
>> your performance requirements? Even if the temp table itself is moved
>> to ramdisk you have catalog updating. Usually from performance
>> standpoint, creation of temp tables is not interesting -- but there
>> are exceptions. If you need extremely fast creation/drop of tempe
>> tables, you probably need to reorganize into permanent table with
>> session local records using various tricks.
>
>
> I am very interested in what you've written in the last sentence above,
> since it is exactly what my requirement is. Could you explain that a bit
> more?
Well, first,
*) is your temporary data session or transaction local (transaction
meaning for duration of function call or till 'commit').
*) if 'transaction' above, what version postgres? if 9.1+ let's
explore use of wcte
*) what are your performance requirements in detail
*) are all sessions using same general structure of temp table(s)?
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Seref Arikan | 2012-11-27 16:06:26 | Re: create table in memory |
Previous Message | Seref Arikan | 2012-11-27 15:44:02 | Re: create table in memory |