Re: create table in memory

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: create table in memory
Дата
Msg-id CAHyXU0yEvcsk-QsfvGvXmSbypdjWWMVtey--fEQQLrww9KHnOg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: create table in memory  (Peter Kroon <plakroon@gmail.com>)
Ответы Re: create table in memory  (Seref Arikan <serefarikan@gmail.com>)
Список pgsql-general
On Fri, Nov 23, 2012 at 4:09 AM, Peter Kroon <plakroon@gmail.com> wrote:
> I've put up a small test case for creating TEMP and UNLOGGED tables.
> DROP TABLE IF EXISTS test CASCADE;
> CREATE TEMP TABLE test(
> id serial,
> the_value text
> );
> Exec time: 54ms
>
> DROP TABLE IF EXISTS test CASCADE;
> CREATE UNLOGGED TABLE test(
> id serial,
> the_value text
> );
> Exec time: 198ms
>
> There is a significant difference.
>
> 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.

merlin


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Restore postgres to specific time
Следующее
От: Hari Babu
Дата:
Сообщение: Renamng the file "MSG00001.bin" to "MSG00001.msg" for internal usage placed in src/bin/pgevent