From: Arnau <arnaulist@andromeiberica.com>
To: Thor-Michael Støre <thor-michael.store@webvelocity.no>
Cc: pgsql-performance@postgresql.org
Subject: Re: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000"
Date: Wed, 04 Apr 2007 14:35:56 +0200
Message-ID: <46139BAC.8000703@andromeiberica.com> (raw)
In-Reply-To: <BF48396AA1F0CD4EA23C6093A992E4DDE38B92@ex-srv-02.exchangemail.no>
References: <BF48396AA1F0CD4EA23C6093A992E4DDE38B92@ex-srv-02.exchangemail.no>
Hi Thor,
Thor-Michael Støre wrote:
> On 2007-04-04 Arnau wrote:
>> Josh Berkus wrote:
>>> Arnau,
>>>
>>>> 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.
>
> Please try to refrain from doing this. This is the "Database as an
> IPC" antipattern (Antipatterns are "commonly-reinvented bad solutions
> to problems", I.E. you can be sure someone has tried this very thing
> before and found it to be a bad solution)
>
> http://en.wikipedia.org/wiki/Database_as_an_IPC
>
> Best solution is (like Ansgar hinted at) to use a real IPC system.
>
> Ofcourse, I've done it myself (not on PostgreSQL though) when working
> at a large corporation where corporate politics prevented me from
> introducing any new interdependency between systems (like having two
> start talking with eachother when they previously didn't), the only
> "common ground" for systems that needed to communicate was a
> database, and one of the systems was only able to run simple SQL
> statements and not stored procedures.
First of all, thanks for your interested but let me explain what I
need to do.
We have a web application where customers want to monitor how it's
performing, but not performing in terms of speed but how many customers
are now browsing in the application, how many have payed browsing
sessions, how many payments have been done, ... More or less is to have
a control panel. The difference is that they want that the information
displayed on a web browser must be "real-time" that is a query every
1-10 seconds.
Then, I haven't read yet the article but I'll do it, how you'd do
what I need to do?
Thanks
--
Arnau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: arnaulist@andromeiberica.com, thor-michael.store@webvelocity.no
Subject: Re: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000"
In-Reply-To: <46139BAC.8000703@andromeiberica.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox