Slow queries on a PostgreSQL table are often just dead rows that nobody cleaned up yet.
SELECT relname, n_dead_tup, last_autovacuum
FROM pg_stat_user_tables ORDER BY n_dead_tup DESC LIMIT 10;
VACUUM (VERBOSE, ANALYZE) orders;
n_dead_tup is the estimated number of dead rows per table, and last_autovacuum tells you when autovacuum last touched it. A table with a huge count and an old date deserves a manual VACUUM (VERBOSE, ANALYZE).
Plain VACUUM makes the space reusable inside the table but rarely shrinks the file. VACUUM FULL does shrink it, and it takes an exclusive lock for the whole run, so keep it for quiet hours.
Further reading: PostgreSQL documentation: Routine Vacuuming