How to deal with seldom used big database and postgresql?
depending on your usage, you could try to partition the data to reduce the scanned data (at 400gb even your indexes are large and heavy to read...)
I think it's your best option as working with 400gb tables is heavy even on a very optimized queries...
You could also pre-warm the cache with the index data , by issuing some of your queries on frequent gps points or by using something like pg_prewarm