sraoss / pgsql-ivm

IVM (Incremental View Maintenance) development for PostgreSQL
Other
129 stars 12 forks source link

Don't use generate_series #69

Closed yugo-n closed 4 years ago

yugo-n commented 4 years ago

In the current implementation, multiplicity of each tuple is stored in ivm_count__ column in views. When SELECT is issued for views with duplicate, the view is replaced with a subquery in which each tuple is joined with generate_series function in order to output tuples of the number of ivm_count__.

This is problematic for following reasons:

Therefore, we need another design to handle tuple duplicate which doesn't use ivm_count__ and generate_series. Note that we still have to use ivm_count__ for supporting DISTINCT and aggregates.