Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000"

From: Arnau <arnaulist(at)andromeiberica(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000"
Date: 2007-04-03 18:59:45
Message-ID: 4612A421.4060808@andromeiberica.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi all,

In MySQL when you create a table you can define something like:

CREATE TABLE `sneakers` (
`sneaker_id` char(24) NOT NULL,
`sneaker_time` int(10) unsigned NOT NULL default '0',
`sneaker_user` int(10) unsigned NOT NULL default '0',
UNIQUE KEY `sneaker_id` (`sneaker_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8 MAX_ROWS=1000;

MySQL manual says:

"The MEMORY storage engine creates tables with contents that are stored
in memory. As indicated by the name, MEMORY tables are stored in memory.
They use hash indexes by default, which makes them very fast, and very
useful for creating temporary tables. However, when the server shuts
down, all rows stored in MEMORY tables are lost. The tables themselves
continue to exist because their definitions are stored in .frm files on
disk, but they are empty when the server restarts.

MAX_ROWS can be used to determine the maximum and minimum numbers of rows"

Is there anything similar in PostgreSQL? The idea behind this is how I
can do in PostgreSQL to have tables where I can query on them very often
something like every few seconds and get results very fast without
overloading the postmaster.

Thank you very much
--
Arnau

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2007-04-03 19:05:31 Re: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000"
Previous Message Ben 2007-04-03 17:33:19 Re: Cache hit ratio