> The time seems entirely spent in fetching rows from table "rid". > Perhaps that table is bloated by lack of vacuuming --- can you > show the output from "vacuum verbose rid"? INFO: vacuuming "firma1.rid" INFO: scanned index "rid_pkey" to remove 7375 row versions DETAIL: CPU 0.01s/0.39u sec elapsed 5.46 sec. INFO: scanned index "rid_dokumnr_idx" to remove 7375 row versions DETAIL: CPU 0.04s/0.39u sec elapsed 2.42 sec. INFO: scanned index "rid_toode_idx" to remove 7375 row versions DETAIL: CPU 0.20s/0.43u sec elapsed 15.59 sec. INFO: scanned index "rid_inpdokumnr_idx" to remove 7375 row versions DETAIL: CPU 0.03s/0.32u sec elapsed 4.37 sec. INFO: "rid": removed 7375 row versions in 2578 pages DETAIL: CPU 0.32s/0.20u sec elapsed 87.93 sec. INFO: index "rid_pkey" now contains 1517900 row versions in 4624 pages DETAIL: 4210 index row versions were removed. 61 index pages have been deleted, 61 are currently reusable. CPU 0.00s/0.00u sec elapsed 0.01 sec. INFO: index "rid_dokumnr_idx" now contains 1517900 row versions in 4598 pages DETAIL: 3219 index row versions were removed. 145 index pages have been deleted, 142 are currently reusable. CPU 0.00s/0.00u sec elapsed 0.01 sec. INFO: index "rid_toode_idx" now contains 1517900 row versions in 9950 pages DETAIL: 7375 index row versions were removed. 245 index pages have been deleted, 232 are currently reusable. CPU 0.00s/0.00u sec elapsed 0.00 sec. INFO: index "rid_inpdokumnr_idx" now contains 1517900 row versions in 5257 pages DETAIL: 7375 index row versions were removed. 319 index pages have been deleted, 311 are currently reusable. CPU 0.00s/0.00u sec elapsed 0.00 sec. INFO: "rid": found 7375 removable, 1517900 nonremovable row versions in 82560 pages DETAIL: 0 dead row versions cannot be removed yet. There were 292585 unused item pointers. 18375 pages contain useful free space. 0 pages are entirely empty. CPU 1.98s/2.18u sec elapsed 157.82 sec. Query returned successfully with no result in 158187 ms. I installed Postgres using standard msi file. postgresql.conf contains autovacuum = on # enable autovacuum subprocess? However, log files does not show any autovacuum messages. So I expect that autovacuum in not running. Any idea why autovacuum is not running ? Andrus. ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster