Thanks! I think there’s two things worth investigating:
- Where is most of the time being spent on the scanner-side analysis. See this post for advice
- Where is most of the time being spent on server-side analysis? You can check the ce.log file.
- I see you’re using Postgres, are you regularly performing a
VACUUM FULL ANALYZE
?