I just want to add that doing a VACUUM FULL VERBOSE <big table> and REINDEX DATABASE <db_name> worked for us to speed up our requests. Index size dropped and our renders are fast again.
before
table_name | row_estimate | table_size | index_size | total_size
--------------------------------------------------------------------------
post_uploads | 52450 | 619 MB | 1255 MB | 1873 MB
post_custom_fields | 513 | 1246 MB | 9096 kB | 1254 MB
posts | 9969 | 256 MB | 13 MB | 269 MB
uploads | 45818 | 92 MB | 88 MB | 179 MB
stylesheet_cache | 1807 | 122 MB | 296 kB | 123 MB
after
table_name | row_estimate | table_size | index_size | total_size
--------------------------------------------------------------------------
post_custom_fields | 5482 | 1238 MB | 1072 kB | 1239 MB
post_uploads | 52483 | 622 MB | 12 MB | 635 MB
posts | 9969 | 128 MB | 2424 kB | 130 MB
stylesheet_cache | 1839 | 122 MB | 232 kB | 122 MB
uploads | 52305 | 92 MB | 30 MB | 122 MB
request performance
Not sure if this has to do with the rebakes since we did a lot of these lately by enabling some settings and doing migrations.
Thanks!
