RE: Implementing Incremental View Maintenance
От | tsunakawa.takay@fujitsu.com |
---|---|
Тема | RE: Implementing Incremental View Maintenance |
Дата | |
Msg-id | OSAPR01MB507311815C5BD1A7853AF8C4FE2E0@OSAPR01MB5073.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: Implementing Incremental View Maintenance (legrand legrand <legrand_legrand@hotmail.com>) |
Ответы |
Re: Implementing Incremental View Maintenance
|
Список | pgsql-hackers |
From: legrand legrand <legrand_legrand@hotmail.com> > For each insert into a base table there are 3 statements: > - ANALYZE pg_temp_3.pg_temp_81976 > - WITH updt AS ( UPDATE public.mv1 AS mv SET __ivm_count__ = ... > - DROP TABLE pg_temp_3.pg_temp_81976 Does it also include CREATE TEMPORARY TABLE, because there's DROP? I remember that repeated CREATE and DROP of temporary tables should be avoided in PostgreSQL. Dropped temporary tables leavesome unused memory in CacheMemoryContext. If creation and deletion of temporary tables are done per row in a singlesession, say loading of large amount of data, memory bloat could crash the OS. That actually happened at a user'senvironment. Plus, repeated create/drop may cause system catalog bloat as well even when they are performed in different sessions. Ina fortunate case, the garbage records gather at the end of the system tables, and autovacuum will free those empty areasby truncating data files. However, if some valid entry persists after the long garbage area, the system tables wouldremain bloated. What kind of workload and data are you targeting with IVM? Regards Takayuki Tsunakawa
В списке pgsql-hackers по дате отправления: