Postgresql, very long joins
The query itself only takes 82 milliseconds (0.082 seconds). 

The reported 26 seconds are either caused by the network or by the application (or SQL client) processing and displaying the result. As far as I can tell, it's highly unlikely that it's the network as the 46375 rows add up to roughly 30KB of transmitted data.