sraoss / pgsql-ivm

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

Create a unique index on IMMV automatically if possible #118

Closed yugo-n closed 3 years ago

yugo-n commented 3 years ago

If the view definition query has a GROUP BY clause, the index is created on the columns of GROUP BY expressions. Otherwise, if the view contains all primary key attritubes of its base tables in the target list, the index is created on these attritubes. In other cases, no index is created.

In all cases, a NOTICE message is output to nform users that an index is created or that an appropriate index is necessary for efficient IVM.