Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DC7BA9FA377 for ; Tue, 3 Apr 2007 15:59:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 10868-06 for ; Tue, 3 Apr 2007 15:59:46 -0300 (ADT) X-Greylist: delayed 00:46:15.878305 by SQLgrey-1.7.4 Received: from fafnir.androme.com (fafnir.androme.com [62.58.96.158]) by postgresql.org (Postfix) with ESMTP id 9D02A9FA21A for ; Tue, 3 Apr 2007 15:59:46 -0300 (ADT) Received: by fafnir.androme.com (Postfix, from userid 1003) id A0722B9894F; Tue, 3 Apr 2007 20:59:45 +0200 (CEST) Message-ID: <4612A421.4060808@andromeiberica.com> Date: Tue, 03 Apr 2007 20:59:45 +0200 From: Arnau Reply-To: arnaulist@andromeiberica.com User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000" Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.599 tagged_above=0 required=5 tests=AWL=0.785, BAYES_40=-0.185, SPF_PASS=-0.001 X-Spam-Level: X-Archive-Number: 200704/24 X-Sequence-Number: 23901 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