Thank you very much, I followed both of your advice, plus adding some extra ram, and the excution time dropped from 10 to 2 minutes. Since I did everything with one shot, I can't tell the weight of every single action..... Regards
IF ________________________________ Da: Igor Neyman [mailto:iney...@perceptron.com] Inviato: mercoledì 12 aprile 2017 15:59 A: Ivan Fabris, Gruppo ColliniConsulting.it; 'pgsql-general@postgresql.org' Oggetto: RE: advice for efresh of materialized view ____________________________________________________________________________________________________ Also, in regards to: Sort Method: external merge Disk: 287784kB I'd increase work_mem setting, to avoid on-disk sorting. Regards, Igor Neyman