Triggers, Stored Procedures to Aggregate table ?

Поиск
Список
Период
Сортировка
От Arvind Sharma
Тема Triggers, Stored Procedures to Aggregate table ?
Дата
Msg-id 215319.89136.qm@web110110.mail.gq1.yahoo.com
обсуждение исходный текст
Ответы Re: Triggers, Stored Procedures to Aggregate table ?  (Richard Broersma <richard.broersma@gmail.com>)
Re: Triggers, Stored Procedures to Aggregate table ?  (Joe Conway <mail@joeconway.com>)
Список pgsql-novice
Hi,

Very new to the Triggers and Sprocs.

I have few tables which stores raw data on minute basis. I want to aggregate this data into another table to store every hour worth of data. And from there on - from this hourly Aggregated table, want to store into another Aggregate Table for a day's worth of data.

You got the direction I am going with this.. :-)....  Hourly, Daily, Weekly aggregated data into their respective tables.

I could write some Java code to run periodically on these tables to transform them into Aggregate tables but that would have the overhead (Network, Disk I/O).   I am wondering if there is any easy way to be able to write something at the Postgres level, where some Trigger will call some Stored Procedure on a particular table which will do the Aggregate (min, max, avg) and store that into a new table.


Any pointers or suggestions or examples would be highly appreciated !


Thanks!
Arvind

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

Предыдущее
От: Atif Jung
Дата:
Сообщение: Re: Returning more than one value from a stored procedure
Следующее
От: Richard Broersma
Дата:
Сообщение: Re: Triggers, Stored Procedures to Aggregate table ?