Yeah, so as you can see from the Ecto logs, the original data reports around 250ms for database and 100-300ms for decode. The db
as reported by ecto also includes the network roundtrip. If your database is on another host, you need to transfer all of that data - with more data it takes longer. This time is not reported by psql - it only reports the internal database time.
The second measurement - the decode
time is how long it takes for ecto to go from the bytes on the wire into the elixir data structures. The more data you have, the more it takes.
It seems that the issue is just the amount of data you’re pushing over the network or then decoding on the elixir side.
Also - what versions of ecto and postgrex are you using?