Add EXISTS clause support in IVM Correlated subqueries using EXISTS in WHERE clause are supported. An EXISTS subquery in WHERE clause is rewritten to LATERAL subquery in FROM clause, and IVM' process can handle this like as a normal join. Also, hidden columns "ivm_exists_count_X__" are added to check if EXISTS condition is satisfied. This column stores the count of how many rows in the subquery are correlated to (joined to) each row of the main query. When a base table contained in EXISTS clause is modified, this count value in IMMV is updated, and a row whose count becomes zero is deleted. restrictions : - EXISTS subqueries are allowed only in WHERE clause. - aggregate functions are not supported together with EXISTS. - EXISTS subqueries in a subquery are not supported. - EXISTS condition can use only with AND Expr |
||
|---|---|---|
| .. | ||
| create_immv.sql | ||
| pg_ivm.sql | ||
| refresh_immv.sql | ||