Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id F28D39FB3BA for ; Wed, 4 Apr 2007 08:33:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 68318-04 for ; Wed, 4 Apr 2007 08:32:52 -0300 (ADT) X-Greylist: delayed 00:24:10.478952 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 24E869FB4D9 for ; Wed, 4 Apr 2007 08:32:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.planetcobalt.net (mail.planetcobalt.net [217.10.9.49]) by svr4.postgresql.org (Postfix) with ESMTP id 93A275AF04F for ; Wed, 4 Apr 2007 11:08:45 +0000 (GMT) Received: by mail.planetcobalt.net (Postfix, from userid 1000) id F08083C0008A; Wed, 4 Apr 2007 13:08:32 +0200 (CEST) Date: Wed, 4 Apr 2007 13:08:32 +0200 From: Ansgar -59cobalt- Wiechers To: pgsql-performance@postgresql.org Subject: Re: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000" Message-ID: <20070404110832.GA1244@mail.planetcobalt.net> References: <4612A421.4060808@andromeiberica.com> <4612A57B.2030601@agliodbs.com> <461366E8.90906@andromeiberica.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <461366E8.90906@andromeiberica.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200704/55 X-Sequence-Number: 23932 On 2007-04-04 Arnau wrote: > Josh Berkus wrote: >>> 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. >> >> If you're only querying the tables every few seconds, then you don't >> really need to worry about performance. > > Well, the idea behind this is to have events tables, and a monitoring > system polls that table every few seconds. I'd like to have a kind of > FIFO stack. From "the events producer" point of view he'll be pushing > rows into that table, when it's filled the oldest one will be removed > to leave room to the newest one. From "the consumer" point of view > he'll read all the contents of that table. > > So I'll not only querying the tables, I'll need to also modify that > tables. Ummm... this may be a dumb question, but why are you trying to implement something like a FIFO with an RDBMS in the first place? Wouldn't it be much easier to implement something like that as a separate program or script? Regards Ansgar Wiechers -- "The Mac OS X kernel should never panic because, when it does, it seriously inconveniences the user." --http://developer.apple.com/technotes/tn2004/tn2118.html