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

Поиск
Список
Период
Сортировка
От Arnau
Тема Re: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000"
Дата
Msg-id 46139BAC.8000703@andromeiberica.com
обсуждение исходный текст
Ответы Re: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000"
Список pgsql-performance
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

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

Предыдущее
От: Andrew - Supernews
Дата:
Сообщение: Re: Scaling SELECT:s with the number of disks on a stripe
Следующее
От: Dimitri
Дата:
Сообщение: Equivalents in PostgreSQL of MySQL's "ENGINE=MEMORY" "MAX_ROWS=1000"