I had speed issues displaying a layer in Geoserver. The layer is retrieved through a postgres store. I have run auto-vacuum on the table (16million rows) and then things being faster. The issue is that I don't know why they are faster. Based on the outcome of the vacuum query:
INFO: vacuuming "osm.asp_trs_roads_osm"
INFO: "asp_trs_roads_osm": found 366524 removable, 9882216 nonremovable row versions in 425556 pages
DETAIL: 0 dead row versions cannot be removed yet.
CPU 8.42s/13.92u sec elapsed 783.24 sec.
Query returned successfully with no result in 1285638 ms.
There were 0 dead rows. So if no change was applied why everything starts working fast after I execute the query?