i've written a maintenance script for our database and would like to run that script on whichever tables most need vacuuming/reindexing during our down time each day. is there any way to determine that within postgres?
i would classify tables needing attention like this:
- tables that need vacuuming
- tables that need reindexing (we find this makes a huge difference to performance)
i see something roughly promising here