Re: Implementing Incremental View Maintenance

2019-06-28 Thread Yugo Nagata
Hi Greg, On Wed, 3 Apr 2019 17:41:36 -0400 Greg Stark wrote: > On Sun, 31 Mar 2019 at 23:22, Yugo Nagata wrote: > > > > Firstly, this will handle simple definition views which includes only > > selection, projection, and join. Standard aggregations (count, sum, avg, > > min, max) are not

Re: Implementing Incremental View Maintenance

2019-06-28 Thread Yugo Nagata
Hi, Attached is a WIP patch of IVM which supports some aggregate functions. Currently, only count and sum are supported. Avg, min, or max is not supported although I think supporting this would not be so hard. As a restriction, expressions specified in GROUP BY must appear in the target list

Re: Implementing Incremental View Maintenance

2019-06-28 Thread Yugo Nagata
Hi Jim, On Fri, 21 Jun 2019 08:41:11 -0700 (MST) Jim Finnerty wrote: > Hi Yugo, > > I'd like to compare the performance of your MV refresh algorithm versus > an approach that logs changes into an mv log table, and can then apply the > changes at some later point in time. I'd like to

Re: Implementing Incremental View Maintenance

2019-05-14 Thread Yugo Nagata
On Mon, 1 Apr 2019 12:11:22 +0900 Yugo Nagata wrote: > On Thu, 27 Dec 2018 21:57:26 +0900 > Yugo Nagata wrote: > > > Hi, > > > > I would like to implement Incremental View Maintenance (IVM) on PostgreSQL. > > > > I am now working on an initial patch for implementing IVM on PostgreSQL. >

Re: Implementing Incremental View Maintenance

2019-04-03 Thread Greg Stark
On Sun, 31 Mar 2019 at 23:22, Yugo Nagata wrote: > > Firstly, this will handle simple definition views which includes only > selection, projection, and join. Standard aggregations (count, sum, avg, > min, max) are not planned to be implemented in the first patch, but these > are commonly used in

Re: Implementing Incremental View Maintenance

2019-03-31 Thread Yugo Nagata
On Thu, 27 Dec 2018 21:57:26 +0900 Yugo Nagata wrote: > Hi, > > I would like to implement Incremental View Maintenance (IVM) on PostgreSQL. I am now working on an initial patch for implementing IVM on PostgreSQL. This enables materialized views to be updated incrementally after one of their

Re: Implementing Incremental View Maintenance

2019-03-14 Thread Mitar
Hi! On Thu, Jan 31, 2019 at 6:20 AM Yugo Nagata wrote: > BTW, what is uecase of reactive/live queries? (just curious) It allows syncing the state between client and server. Client can then have a subset of data and server can push changes as they are happening to the client. Client can in a

Re: Implementing Incremental View Maintenance

2019-01-31 Thread Yugo Nagata
On Mon, 7 Jan 2019 00:39:00 -0800 Mitar wrote: > That sounds great! I am interested in this topic because I am > interested in reactive/live queries and support for them in > PostgreSQL. [1] > > In that context, the problem is very similar: based on some state of > query results and updated

Re: Implementing Incremental View Maintenance

2019-01-31 Thread Yugo Nagata
On Tue, 1 Jan 2019 14:46:25 +0700 Nguyễn Trần Quốc Vinh wrote: > We have some result on incremental update for MVs. We generate triggers on > C to do the incremental maintenance. We posted the code to github about 1 > year ago, but unfortunately i posted a not-right ctrigger.h header. The >

Re: Implementing Incremental View Maintenance

2019-01-07 Thread Mitar
Hi! On Thu, Dec 27, 2018 at 4:57 AM Yugo Nagata wrote: > I would like to implement Incremental View Maintenance (IVM) on PostgreSQL. > IVM is a technique to maintain materialized views which computes and applies > only the incremental changes to the materialized views rather than > recomputate

Re: Implementing Incremental View Maintenance

2019-01-06 Thread Nguyễn Trần Quốc Vinh
Dear All, The tool analyzes the input query and then generates triggers (trigger functions and pl/pgsql scripts as well) on all manipulating events (insert/updates/delete) for all underlying base tables. The triggers do incremental updates to the table that contains the query result (MV). You can

Re: Implementing Incremental View Maintenance

2019-01-06 Thread Tatsuo Ishii
> Hi all, just wanted to say I am very happy to see progress made on this, > my codebase has multiple "materialized tables" which are maintained with > statement triggers (transition tables) and custom functions. They are ugly > and a pain to maintain, but they work because I have no other >

Re: Implementing Incremental View Maintenance

2018-12-31 Thread Nguyễn Trần Quốc Vinh
Dear all, We have some result on incremental update for MVs. We generate triggers on C to do the incremental maintenance. We posted the code to github about 1 year ago, but unfortunately i posted a not-right ctrigger.h header. The mistake was exposed to me when a person could not compile the

Re: Implementing Incremental View Maintenance

2018-12-31 Thread Adam Brusselback
Hi all, just wanted to say I am very happy to see progress made on this, my codebase has multiple "materialized tables" which are maintained with statement triggers (transition tables) and custom functions. They are ugly and a pain to maintain, but they work because I have no other solution...for

Re: Implementing Incremental View Maintenance

2018-12-31 Thread denty
Hi Yugo. > I would like to implement Incremental View Maintenance (IVM) on > PostgreSQL. Great. :-) I think it would address an important gap in PostgreSQL’s feature set. > 2. How to compute the delta to be applied to materialized views > > Essentially, IVM is based on relational algebra.

<    1   2   3