There is no “round trip” and no network stacked involved in querying a local Postgres instance (web app on same VM as db).
Attention is better spent designing an appropriate schema than worrying about the network being too slow to run a single query (if it is, you’ve already failed).